Package org.apache.neethi

Examples of org.apache.neethi.PolicyRegistry.lookup()


        if (key.startsWith("#")) {
          key = key.substring(key.indexOf("#") + 1);
        }

        Policy p = reg.lookup(key);

        if (p == null) {
          throw new Exception("Policy not found for uri : " + key);
        }
View Full Code Here


        List policyElements = des.getPolicyInclude().getPolicyElements();
        PolicyRegistry registry = des.getPolicyInclude().getPolicyRegistry();

        Object policyComponent;

        Policy policy = registry.lookup(id);

        if (policy != null) {
            return policy;
        }
View Full Code Here

                if (key.startsWith("#")) {
                    key = key.substring(key.indexOf("#") + 1);
                }

                Policy p = reg.lookup(key);

                if (p == null) {
                    throw new Exception("Policy not found for uri : " + key);
                }
View Full Code Here

        List policyElements = des.getPolicyInclude().getPolicyElements();
        PolicyRegistry registry = des.getPolicyInclude().getPolicyRegistry();

        Object policyComponent;

        Policy policy = registry.lookup(id);

        if (policy != null) {
            return policy;
        }
View Full Code Here

        List policyElements = des.getPolicyInclude().getPolicyElements();
        PolicyRegistry registry = des.getPolicyInclude().getPolicyRegistry();

        Object policyComponent = null;

        Policy policy = registry.lookup(id);

        if (policy != null) {
            return policy;
        }
View Full Code Here

            return null;
        }
       
        PolicyInclude policyInclude = subject.getPolicyInclude();
        PolicyRegistry policyRegistry = policyInclude.getPolicyRegistry();
        Policy policy = policyRegistry.lookup(key);
       
        if (policy != null) {
            return policy;
        }
       
View Full Code Here

        List policyElements = des.getPolicyInclude().getPolicyElements();
        PolicyRegistry registry = des.getPolicyInclude().getPolicyRegistry();

        Object policyComponent;

        Policy policy = registry.lookup(id);

        if (policy != null) {
            return policy;
        }
View Full Code Here

                if (key.startsWith("#")) {
                    key = key.substring(key.indexOf("#") + 1);
                }

                Policy p = reg.lookup(key);

                if (p == null) {
                    throw new Exception("Policy not found for uri : " + key);
                }
View Full Code Here

                    key = uri.substring(uri.indexOf('#') + 1);
                } else {
                    key = uri;
                }

                Policy p = registry.lookup(key);

                if (p == null) {
                    throw new RuntimeException("Cannot resolve " + uri
                            + " to a Policy");
                }
View Full Code Here

   
    Policy resolveLocal(PolicyReference ref, final Bus bus, DescriptionInfo i) {
        String uri = ref.getURI().substring(1);
        String absoluteURI = i == null ? uri : i.getBaseURI() + uri;
        PolicyRegistry registry = bus.getExtension(PolicyEngine.class).getRegistry();
        Policy resolved = registry.lookup(absoluteURI);
        if (null != resolved) {
            return resolved;
        }
        ReferenceResolver resolver = new ReferenceResolver() {
            public Policy resolveReference(String uri) {
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.