private void processFilter()

in modules/core/src/main/java/org/apache/savan/configuration/ConfigurationManager.java [335:365]


    private void processFilter(OMElement element) throws SavanException {
        OMElement nameElement = element.getFirstChildWithName(new QName(NAME));
        OMElement identifierElement = element.getFirstChildWithName(new QName(IDENTIFIER));
        OMElement classElement = element.getFirstChildWithName(new QName(CLASS));

        if (nameElement == null)
            throw new SavanException("Name element is not present within the Filter");
        if (identifierElement == null)
            throw new SavanException("Identifier element is not present within the Filter");
        if (classElement == null)
            throw new SavanException("Class element is not present within the Filter");

        String name = nameElement.getText();
        String identifier = identifierElement.getText();
        String clazz = classElement.getText();

        //initialize the class to check weather it is value
        Object obj = getObject(clazz);

        if (!(obj instanceof Filter)) {
            String message = "Class " + clazz + " does not implement the  Filter interface.";
            throw new SavanException(message);
        }

        FilterBean bean = new FilterBean();
        bean.setName(name);
        bean.setIdentifier(identifier);
        bean.setClazz(clazz);

        filterMap.put(identifier, bean);
    }