Package org.apache.neethi

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


   
    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


   
    protected Policy resolveExternal(PolicyReference ref,  String baseURI, Bus bus) {
        PolicyBuilder builder = bus.getExtension(PolicyBuilder.class);
        ReferenceResolver resolver = new RemoteReferenceResolver(baseURI, builder);
        PolicyRegistry registry = bus.getExtension(PolicyEngine.class).getRegistry();
        Policy resolved = registry.lookup(ref.getURI());
        if (null != resolved) {
            return resolved;
        }
        return resolver.resolveReference(ref.getURI());
    }
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

   
    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

   
    protected Policy resolveExternal(PolicyReference ref,  String baseURI, Bus bus) {
        PolicyBuilder builder = bus.getExtension(PolicyBuilder.class);
        ReferenceResolver resolver = new RemoteReferenceResolver(baseURI, builder);
        PolicyRegistry registry = bus.getExtension(PolicyEngine.class).getRegistry();
        Policy resolved = registry.lookup(ref.getURI());
        if (null != resolved) {
            return resolved;
        }
        return resolver.resolveReference(ref.getURI());
    }
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

   
    Policy resolveLocal(PolicyReference ref, Element e, final Bus bus) {
        String uri = ref.getURI().substring(1);
        String absoluteURI = e.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

    protected Policy resolveExternal(PolicyReference ref,  String baseURI, Bus bus) {
        PolicyBuilder builder = bus.getExtension(PolicyBuilder.class);
        ReferenceResolver resolver = new RemoteReferenceResolver(baseURI, builder,
            bus.getExtension(PolicyConstants.class));
        PolicyRegistry registry = bus.getExtension(PolicyEngine.class).getRegistry();
        Policy resolved = registry.lookup(ref.getURI());
        if (null != resolved) {
            return resolved;
        }
        return resolver.resolveReference(ref.getURI());
    }
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.