private InteropActionEntity validateAndGetAction()

in service/src/main/java/org/apache/fineract/cn/interoperation/service/internal/service/InteropService.java [724:738]


    private InteropActionEntity validateAndGetAction(@NotNull String transactionCode, @NotNull String actionIdentifier, @NotNull InteropActionType actionType, boolean one) {
        //TODO: error handling
        InteropActionEntity action = actionRepository.findByIdentifier(actionIdentifier);
        if (action == null) {
            if (one)
                throw new UnsupportedOperationException("Interperation action " + actionType + '/' + actionIdentifier + " was not found for this transaction " + transactionCode);
            return null;
        }
        if (!action.getTransaction().getIdentifier().equals(transactionCode))
            throw new UnsupportedOperationException("Interperation action " + actionType + '/' + actionIdentifier + " does not exist in this transaction " + transactionCode);
        if (action.getActionType() != actionType)
            throw new UnsupportedOperationException("Interperation action " + actionIdentifier + " is not this type " + actionType);

        return action;
    }