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

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


     */
    public Assertion build(Element elem, AssertionBuilderFactory factory) throws IllegalArgumentException {
        Assertion assertion = null;
        if (RSP_NAMESPACE.equals(elem.getNamespaceURI()) && CONFORMANT_NAME.equals(elem.getLocalName())) {
            boolean optional = XMLPrimitiveAssertionBuilder.isOptional(elem);
            assertion = new PrimitiveAssertion(CONFORMANT_QNAME,  optional);
        }
        return assertion;
    }
View Full Code Here


            if (RM11Constants.RMASSERTION_NAME.equals(lname)) {
               
                // top-level RMAssertion, with nested policy
                XMLPrimitiveAssertionBuilder nesting = new XMLPrimitiveAssertionBuilder() {
                    public Assertion newPrimitiveAssertion(Element element, Map<QName, String> mp) {
                        return new PrimitiveAssertion(RM11Constants.WSRMP_RMASSERTION_QNAME, isOptional(element),
                            isIgnorable(element), mp);       
                    }
                    public Assertion newPolicyContainingAssertion(Element element, Map<QName, String> mp,
                        Policy policy) {
                        return new PolicyContainingPrimitiveAssertion(RM11Constants.WSRMP_RMASSERTION_QNAME,
                            isOptional(element), isIgnorable(element), mp, policy);
                    }
                };
                assertion = nesting.build(elem, factory);
               
            } else if (SEQUENCESTR_NAME.equals(lname)) {
                assertion = new PrimitiveAssertion(SEQSTR_QNAME,  optional);
            } else if (SEQUENCETRANSEC_NAME.equals(lname)) {
                assertion = new PrimitiveAssertion(SEQTRANSSEC_QNAME,  optional);
            } else if (DELIVERYASSURANCE_NAME.equals(lname)) {
               
                // DeliveryAssurance, with nested policy
                XMLPrimitiveAssertionBuilder nesting = new XMLPrimitiveAssertionBuilder() {
                    public Assertion newPrimitiveAssertion(Element element, Map<QName, String> mp) {
                        return new PrimitiveAssertion(DELIVERYASSURANCE_QNAME, isOptional(element),
                            isIgnorable(element), mp);       
                    }
                    public Assertion newPolicyContainingAssertion(Element element, Map<QName, String> mp,
                        Policy policy) {
                        return new PolicyContainingPrimitiveAssertion(DELIVERYASSURANCE_QNAME,
                            isOptional(element), isIgnorable(element), mp, policy);
                    }
                };
                assertion = nesting.build(elem, factory);
               
            } else if (EXACTLYONCE_NAME.equals(lname)) {
                assertion = new PrimitiveAssertion(EXACTLYONCE_QNAME,  optional);
            } else if (ATLEASTONCE_NAME.equals(lname)) {
                assertion = new PrimitiveAssertion(ATLEASTONCE_QNAME,  optional);
            } else if (ATMOSTONCE_NAME.equals(lname)) {
                assertion = new PrimitiveAssertion(ATMOSTONCE_QNAME,  optional);
            } else if (INORDER_NAME.equals(lname)) {
                assertion = new PrimitiveAssertion(INORDER_QNAME,  optional);
            }
        }
        return assertion;
    }
View Full Code Here

        String local = "UsingAddressing";
        if ("http://www.w3.org/2005/08/addressing".equals(addressingNamespace)) {
            ns = "http://www.w3.org/2007/02/addressing/metadata";
            local = "Addressing";
        }
        return new PrimitiveAssertion(new QName(ns, local), true);
    }
View Full Code Here

        String local = "UsingAddressing";
        if ("http://www.w3.org/2005/08/addressing".equals(addressingNamespace)) {
            ns = "http://www.w3.org/2007/02/addressing/metadata";
            local = "Addressing";
        }
        return new PrimitiveAssertion(new QName(ns, local), true);
    }
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


    private AssertionInfoMap createTestAssertions() {
        AssertionInfoMap aim = new AssertionInfoMap(CastUtils.cast(Collections.EMPTY_LIST,
                                                                   PolicyAssertion.class));
        Assertion a = new PrimitiveAssertion(ONEWAY_QNAME);
        Assertion b = new PrimitiveAssertion(DUPLEX_QNAME);

        AssertionInfo ai = new AssertionInfo(a);
        AssertionInfo bi = new AssertionInfo(b);

        aim.put(ONEWAY_QNAME, Collections.singleton(ai));
View Full Code Here

        String local = "UsingAddressing";
        if ("http://www.w3.org/2005/08/addressing".equals(addressingNamespace)) {
            ns = "http://www.w3.org/2007/02/addressing/metadata";
            local = "Addressing";
        }
        return new PrimitiveAssertion(new QName(ns, local), true);
    }
View Full Code Here

        String local = "UsingAddressing";
        if ("http://www.w3.org/2005/08/addressing".equals(addressingNamespace)) {
            ns = "http://www.w3.org/2007/02/addressing/metadata";
            local = "Addressing";
        }
        return new PrimitiveAssertion(new QName(ns, local), true);
    }
View Full Code Here

        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

        if (attribute != null) {
            optional = Boolean.valueOf(attribute.getValue());
        }

        if (MetadataConstants.MTOM_ASSERTION_QNAME.equals(qn)) {
            return new PrimitiveAssertion(MetadataConstants.MTOM_ASSERTION_QNAME, optional);
        }

        return null;
    }
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.