Example usage for org.springframework.security.config Elements FILTER_CHAIN_MAP

List of usage examples for org.springframework.security.config Elements FILTER_CHAIN_MAP

Introduction

In this page you can find the example usage for org.springframework.security.config Elements FILTER_CHAIN_MAP.

Prototype

String FILTER_CHAIN_MAP

To view the source code for org.springframework.security.config Elements FILTER_CHAIN_MAP.

Click Source Link

Usage

From source file:org.springframework.security.config.SecurityNamespaceHandler.java

public BeanDefinition parse(Element element, ParserContext pc) {
    if (!namespaceMatchesVersion(element)) {
        pc.getReaderContext().fatal(/*from  w  ww.j a v a2  s. c om*/
                "You cannot use a spring-security-2.0.xsd or spring-security-3.0.xsd or spring-security-3.1.xsd schema or spring-security-3.2.xsd schema or spring-security-4.0.xsd schema "
                        + "with Spring Security 4.2. Please update your schema declarations to the 4.2 schema.",
                element);
    }
    String name = pc.getDelegate().getLocalName(element);
    BeanDefinitionParser parser = parsers.get(name);

    if (parser == null) {
        // SEC-1455. Load parsers when required, not just on init().
        loadParsers();
    }

    if (parser == null) {
        if (Elements.HTTP.equals(name) || Elements.FILTER_SECURITY_METADATA_SOURCE.equals(name)
                || Elements.FILTER_CHAIN_MAP.equals(name) || Elements.FILTER_CHAIN.equals(name)) {
            reportMissingWebClasses(name, pc, element);
        } else {
            reportUnsupportedNodeType(name, pc, element);
        }

        return null;
    }

    return parser.parse(element, pc);
}

From source file:org.springframework.security.config.SecurityNamespaceHandler.java

public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext pc) {
    String name = pc.getDelegate().getLocalName(node);

    // We only handle elements
    if (node instanceof Element) {
        if (Elements.INTERCEPT_METHODS.equals(name)) {
            return interceptMethodsBDD.decorate(node, definition, pc);
        }//from   w  ww.j av  a2 s  . c  om

        if (Elements.FILTER_CHAIN_MAP.equals(name)) {
            if (filterChainMapBDD == null) {
                loadParsers();
            }
            if (filterChainMapBDD == null) {
                reportMissingWebClasses(name, pc, node);
            }
            return filterChainMapBDD.decorate(node, definition, pc);
        }
    }

    reportUnsupportedNodeType(name, pc, node);

    return null;
}