Package org.openengsb.core.ekb.api.transformation

Examples of org.openengsb.core.ekb.api.transformation.TransformationOperationException


            }
        } catch (Exception e) {
            String message = "Unable to create the desired object. The instantiate operation will be ignored.";
            message = String.format(message, targetType);
            getLogger().error(message);
            throw new TransformationOperationException(message, e);
        }
    }
View Full Code Here


            }
        }
        String message = "The class %s can't be found. The instantiate operation will be ignored.";
        message = String.format(message, className);
        getLogger().error(message);
        throw new TransformationOperationException(message, e);       
    }
View Full Code Here

        throws TransformationOperationException {
        try {
            Integer index = Integer.parseInt(indexString);
            return source.split(splitString)[index];
        } catch (NumberFormatException e) {
            throw new TransformationOperationException("The given result index parameter is not a number");
        } catch (IndexOutOfBoundsException e) {
            throw new TransformationOperationException(
                "The split result does not have that much results for the index parameter");
        }
    }
View Full Code Here

    public Object performOperation(List<Object> input, Map<String, String> parameters)
        throws TransformationOperationException {
        checkInputSize(input);
        Object value = parameters.get(input.get(0));
        if (value == null) {
            throw new TransformationOperationException("For the given key is no mapping defined");
        }
        return value;
    }
View Full Code Here

        int inputCount = getOperationInputCount();
        int inputSize = input.size();
        if (inputCount == -2) {
            return;
        } else if (inputCount == -1 && input.size() < 1) {
            throw new TransformationOperationException("There must be at least one input value.");
        } else if (inputCount != -1 && inputSize != inputCount) {
            throw new TransformationOperationException(
                "The input values are not matching with the operation input count.");
        }
    }
View Full Code Here

            return value;
        }
        if (abortOnError) {
            String error = String.format("There is no parameter with the name %s present. The step will be ignored.",
                paramName);
            throw new TransformationOperationException(error);
        }
        logger.debug("There is no parameter with the name {} present. The value {} will be taken instead.", paramName,
            defaultValue);
        return defaultValue;
    }
View Full Code Here

                builder.append(def).append(" will be taken instead.");
            }

            logger.warn(builder.toString());
            if (abortOnError) {
                throw new TransformationOperationException(builder.toString());
            }
        }
        return integer;
    }
View Full Code Here

     * Generates a matcher for the given valueString with the given regular expression.
     */
    protected Matcher generateMatcher(String regex, String valueString)
        throws TransformationOperationException {
        if (regex == null) {
            throw new TransformationOperationException("No regex defined. The step will be skipped.");
        }
        try {
            Pattern pattern = Pattern.compile(regex);
            return pattern.matcher(valueString);
        } catch (PatternSyntaxException e) {
            String message =
                String.format("Given regex string %s can't be compiled. The step will be skipped.", regex);
            logger.warn(message);
            throw new TransformationOperationException(message);
        }
    }
View Full Code Here

            return method.invoke(object);
        } catch (NoSuchMethodException e) {
            StringBuilder builder = new StringBuilder();
            builder.append("The type of the given field for the length step doesn't support ");
            builder.append(functionName).append(" method. So 0 will be used as standard value.");
            throw new TransformationOperationException(builder.toString(), e);
        } catch (IllegalArgumentException e) {
            throw new TransformationOperationException("Can't get length of the source field", e);
        } catch (IllegalAccessException e) {
            throw new TransformationOperationException("Can't get length of the source field", e);
        } catch (InvocationTargetException e) {
            throw new TransformationOperationException("Can't get length of the source field", e);
        }
    }
View Full Code Here

    @Override
    public Object performOperation(List<Object> input, Map<String, String> parameters)
        throws TransformationOperationException {
        if (input.size() != getOperationInputCount()) {
            throw new TransformationOperationException(
                "The input values are not matching with the operation input count.");
        }
        String source = input.get(0).toString();
        Integer from = getFromParameter(parameters);
        Integer to = getToParameter(parameters, source.length());
View Full Code Here

TOP

Related Classes of org.openengsb.core.ekb.api.transformation.TransformationOperationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.