Examples of FilterConfigurationException


Examples of org.openengsb.core.api.remote.FilterConfigurationException

        Iterator<Object> iterator = filters.iterator();

        FilterChainElement firstInstance = getInstanceFromListElement(iterator.next());
        if (!firstInstance.getSupportedInputType().isAssignableFrom(inputType)
                || !firstInstance.getSupportedOutputType().isAssignableFrom(outputType)) {
            throw new FilterConfigurationException(String.format(
                "incompatible Filtertype (%s) should be (%s->%s) - is (%s->%s)",
                firstInstance.getClass(), inputType, outputType, firstInstance.getSupportedInputType(),
                firstInstance.getSupportedOutputType()));
        }
        FilterChainElement current = firstInstance;
View Full Code Here

Examples of org.openengsb.core.api.remote.FilterConfigurationException

    private FilterChainElement createFromClass(Object next) {
        try {
            return (FilterChainElement) ((Class<?>) next).newInstance();
        } catch (InstantiationException e) {
            throw new FilterConfigurationException("Exception when instantiating FilterAction", e);
        } catch (IllegalAccessException e) {
            throw new FilterConfigurationException("Exception when instantiating FilterAction", e);
        }
    }
View Full Code Here

Examples of org.openengsb.core.api.remote.FilterConfigurationException

                break;
            }
            validateElement(element);
        }
        if (iterator.hasNext()) {
            throw new FilterConfigurationException("Cannot add more filter-actions after final element");
        }
    }
View Full Code Here

Examples of org.openengsb.core.api.remote.FilterConfigurationException

        }
        // Allow FilterAction-classes with proper default-constructors
        if (Class.class.isAssignableFrom(objClass)) {
            Class<?> filterClass = (Class<?>) object;
            if (!FilterAction.class.isAssignableFrom(filterClass)) {
                throw new FilterConfigurationException(String.format(
                    "Incompatible type: %s, Class must be derived from one of the following: %s", filterClass,
                    FilterAction.class.getName()));
            }
            try {
                filterClass.getConstructor();
            } catch (NoSuchMethodException e) {
                throw new FilterConfigurationException("Filter-class must have a visible default constructor", e);
            }
            return;
        }
        throw new FilterConfigurationException(String.format("Element %s is not a valid FilterElement",
            object.toString()));
    }
View Full Code Here

Examples of org.openengsb.core.api.remote.FilterConfigurationException

    }

    protected static final void checkNextInputAndOutputTypes(FilterAction next,
            Class<?> inputType, Class<?> outputType) throws FilterConfigurationException {
        if (!next.getSupportedInputType().isAssignableFrom(inputType)) {
            throw new FilterConfigurationException(String.format("inputTypes are not compatible %s (%s - %s)",
                next, next.getSupportedInputType(), inputType));
        }
        if (!next.getSupportedOutputType().isAssignableFrom(outputType)) {
            throw new FilterConfigurationException(String.format("outputTypes are not compatible (%s - %s)",
                next.getSupportedOutputType(), outputType));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.