Add an interop release transfer command handler (FINERACT-1281)
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
db32e569d5
commit
30d04ce34e
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.fineract.interoperation.handler;
|
||||
|
||||
import static org.apache.fineract.interoperation.util.InteropUtil.ACTION_TRANSFER_RELEASE;
|
||||
import static org.apache.fineract.interoperation.util.InteropUtil.ENTITY_NAME_TRANSFER;
|
||||
|
||||
import org.apache.fineract.commands.annotation.CommandType;
|
||||
import org.apache.fineract.commands.handler.NewCommandSourceHandler;
|
||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
|
||||
import org.apache.fineract.interoperation.service.InteropService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Service
|
||||
@CommandType(entity = ENTITY_NAME_TRANSFER, action = ACTION_TRANSFER_RELEASE)
|
||||
public class ReleaseInteropTransferHandler implements NewCommandSourceHandler {
|
||||
|
||||
private final InteropService interopService;
|
||||
|
||||
@Autowired
|
||||
public ReleaseInteropTransferHandler(InteropService interopService) {
|
||||
this.interopService = interopService;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public CommandProcessingResult processCommand(final JsonCommand command) {
|
||||
return this.interopService.releaseTransfer(command);
|
||||
}
|
||||
}
|
||||
+1
@@ -41,6 +41,7 @@ public final class InteropUtil {
|
||||
|
||||
public static final String ACTION_TRANSFER_PREPARE = "PREPARE";
|
||||
public static final String ACTION_TRANSFER_COMMIT = "CREATE";
|
||||
public static final String ACTION_TRANSFER_RELEASE = "RELEASE";
|
||||
|
||||
public static final String PARAM_LOCALE = "locale";
|
||||
public static final String PARAM_DATE_FORMAT = "dateFormat";
|
||||
|
||||
Reference in New Issue
Block a user