Package org.apache.cxf.ws.policy.builder.primitive

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion


        requestSecurityToken(tok.getIssuerAddress(), action, "/Renew", tok);
    }

    private PrimitiveAssertion getAddressingAssertion() {
        String ns = "http://schemas.xmlsoap.org/ws/2004/08/addressing/policy";
        return new PrimitiveAssertion(new QName(ns, "UsingAddressing"));
    }
View Full Code Here


   
    @Test
    public void testCheckEffectivePolicy() {
        Policy p = new Policy();
        QName aqn = new QName("http://x.y.z", "a");
        Assertion a = new PrimitiveAssertion(aqn);
        QName bqn = new QName("http://x.y.z", "b");
        Assertion b = new PrimitiveAssertion(bqn);
        QName cqn = new QName("http://x.y.z", "c");
        Assertion c = new PrimitiveAssertion(cqn);
        All alt1 = new All();
        alt1.addAssertion(a);
        alt1.addAssertion(b);
        All alt2 = new All();
        alt2.addAssertion(c);
View Full Code Here

    }
   
    @Test
    public void testCheck() throws PolicyException {
        QName aqn = new QName("http://x.y.z", "a");
        Assertion a = new PrimitiveAssertion(aqn);
        Collection<Assertion> assertions = new ArrayList<Assertion>();
        assertions.add(a);
        AssertionInfoMap aim = new AssertionInfoMap(assertions);
        try {
            aim.check();
View Full Code Here

   
    @Test
    public void testAllAssertionsIn() {
       
        Policy nested = new Policy();
        Assertion nb = new PrimitiveAssertion(
            new QName("http://x.y.z", "b"));
        nested.addAssertion(nb);
       
        Policy p = new Policy();
        Assertion a1 = new PrimitiveAssertion(
                                new QName("http://x.y.z", "a"));
        Assertion a2 = new PrimitiveAssertion(
                                 new QName("http://x.y.z", "a"));
        Assertion b = new PrimitiveAssertion(
                                new QName("http://x.y.z", "b"));
        Assertion c = new PolicyContainingPrimitiveAssertion(
                               new QName("http://x.y.z", "c"), false, false, nested);
       
        All alt1 = new All();
View Full Code Here

        assertTrue(!assertion.equal(pc));
        pc = (PolicyComponent)new ExactlyOne();
        assertTrue(!assertion.equal(pc));
       
        IMocksControl ctrl = EasyMock.createNiceControl();
        PrimitiveAssertion xpa = ctrl.createMock(PrimitiveAssertion.class);
        QName oqn = new QName("http://cxf.apache.org/test/assertions/blah", "OtherType");
        EasyMock.expect(xpa.getName()).andReturn(oqn);
        EasyMock.expect(xpa.getType()).andReturn(Constants.TYPE_ASSERTION);
       
        ctrl.replay();
        assertTrue(!assertion.equal(xpa));
        ctrl.verify();
           
View Full Code Here

        }
        if (this.getEncryptionToken() != null) {
            all.addPolicyComponent(this.getEncryptionToken());
        }
        if (isIncludeTimestamp()) {
            all.addPolicyComponent(new PrimitiveAssertion(SP12Constants.INCLUDE_TIMESTAMP));
        }
        if (getLayout() != null) {
            all.addPolicyComponent(getLayout());
        }
View Full Code Here

        All all = new All();
        if (transportToken != null) {
            all.addPolicyComponent(transportToken);
        }
        if (isIncludeTimestamp()) {
            all.addPolicyComponent(new PrimitiveAssertion(SP12Constants.INCLUDE_TIMESTAMP));
        }
        if (getLayout() != null) {
            all.addPolicyComponent(getLayout());
        }
        ea.addPolicyComponent(all);
View Full Code Here

        assertSame(a, assertions.iterator().next());       
        control.verify();
       
        assertions.clear();
        Policy p = new Policy();
        a = new PrimitiveAssertion(new QName("http://x.y.z", "a"));
        p.addAssertion(a);
       
        // id has no #
        engine.getRegistry().register("ab", p);
       
View Full Code Here

            if (null != lst && !lst.isEmpty()) {
                assertion = lst.iterator().next().getAssertion();
            }
        }
        if (assertion == null) {
            return new PrimitiveAssertion(MetadataConstants.USING_ADDRESSING_2006_QNAME,
                                          optional);
        } else if (optional) {
            return new PrimitiveAssertion(assertion.getName(),
                                          optional);           
        }
        return assertion;
    }
View Full Code Here

        assertSame(a, assertions.iterator().next());       
        control.verify();
       
        assertions.clear();
        Policy p = new Policy();
        a = new PrimitiveAssertion(new QName("http://x.y.z", "a"));
        p.addAssertion(a);
       
        // id has no #
        engine.getRegistry().register("ab", p);
       
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

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.