Package org.apache.neethi

Examples of org.apache.neethi.Policy$PolicyIterator


        return location;
    }

    public Policy getEffectivePolicy(BindingFaultInfo bfi) {
        readDocument();
        Policy p = new Policy();
        for (PolicyAttachment pa : attachments) {
            if (pa.appliesTo(bfi)) {
                p = p.merge(pa.getPolicy());
            }
        }
               
        return p;
    }
View Full Code Here


        return p;
    }

    public Policy getEffectivePolicy(BindingMessageInfo bmi) {
        readDocument();
        Policy p = new Policy();
        for (PolicyAttachment pa : attachments) {
            if (pa.appliesTo(bmi)) {
                p = p.merge(pa.getPolicy());
            }
        }
               
        return p;
    }
View Full Code Here

        control.verify();
    }
      
    @Test
    public void testChooseAlternative() {
        Policy policy = new Policy();
       
        PolicyEngineImpl engine = control.createMock(PolicyEngineImpl.class);
        Assertor assertor = control.createMock(Assertor.class);
        AlternativeSelector selector = control.createMock(AlternativeSelector.class);
       
View Full Code Here

    @Test
    public void testUpdatePolicy() {
       
        EndpointPolicyImpl epi = new TestEndpointPolicy();
       
        Policy p1 = new Policy();
        QName aqn1 = new QName("http://x.y.z", "a");
        p1.addAssertion(mockAssertion(aqn1, 5, true));
       
        Policy p2 = new Policy();
        QName aqn2 = new QName("http://x.y.z", "b");
        p2.addAssertion(mockAssertion(aqn2, 5, true));
        control.replay();
       
        epi.setPolicy((Policy)p1.normalize(null, true));
               
        Policy ep = epi.updatePolicy(p2).getPolicy();
       
        List<ExactlyOne> pops =
            CastUtils.cast(ep.getPolicyComponents(), ExactlyOne.class);
        assertEquals("New policy must have 1 top level policy operator", 1, pops.size());
        List<All> alts =
            CastUtils.cast(pops.get(0).getPolicyComponents(), All.class);
        assertEquals("2 alternatives should be available", 2, alts.size());
       
View Full Code Here

        return p;
    }

    public Policy getEffectivePolicy(BindingOperationInfo boi) {
        readDocument();
        Policy p = new Policy();
        for (PolicyAttachment pa : attachments) {
            if (pa.appliesTo(boi)) {
                p = p.merge(pa.getPolicy());
            }
        }
               
        return p;
    }
View Full Code Here

        return p;
    }

    public Policy getEffectivePolicy(EndpointInfo ei) {
        readDocument();
        Policy p = new Policy();
        for (PolicyAttachment pa : attachments) {
            if (pa.appliesTo(ei)) {
                p = p.merge(pa.getPolicy());
            }
        }
               
        return p;
    }
View Full Code Here

        return p;
    }

    public Policy getEffectivePolicy(ServiceInfo si) {
        readDocument();
        Policy p = new Policy();
        for (PolicyAttachment pa : attachments) {
            if (pa.appliesTo(si)) {
                p = p.merge(pa.getPolicy());
            }
        }
               
        return p;
    }
View Full Code Here

    }

    @Test
    public void testUpdatePolicyWithEmptyPolicy() {
       
        doTestUpdateWithEmptyPolicy(new Policy());
    }
View Full Code Here

                                                        axis2ConfigParamPolicy.getParamElements().get(paramName).getFirstElement());
                            configParam.setParameterElement(axis2ConfigParamPolicy.getParamElements().get(paramName));
                            configContext.getAxisConfiguration().addParameter(configParam);
                        }
                    } else if ( policy instanceof Policy ) {
                        Policy wsPolicy = (Policy)policy;
                        configContext.getAxisConfiguration().applyPolicy(wsPolicy);
                    }
                }
            }
        }
View Full Code Here

        Client client = ClientProxy.getClient(greeter);
        List<ServiceInfo> sis = client.getEndpoint().getService().getServiceInfos();
       
        ServiceInfo si = sis.get(0);
        Policy p = si.getExtensor(Policy.class);
        assertNotNull(p);
       
        testInterceptors(bus);
       
        // oneway
View Full Code Here

TOP

Related Classes of org.apache.neethi.Policy$PolicyIterator

Copyright © 2018 www.massapicom. 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.