Package org.apache.neethi

Examples of org.apache.neethi.All.addPolicyComponent()


        while (iterator.hasNext()) {
            PolicyComponent a2 = iterator.next();
            if (a2 instanceof Assertion) {
                Assertion assertion = findCompatibleAssertion((Assertion)a2, alt1, remove);
                if (assertion != null) {
                    all.addPolicyComponent(assertion);
                } else if (!strict && ((Assertion)a2).isIgnorable()) {
                    all.addPolicyComponent(a2);
                } else if (strict || !((Assertion)a2).isIgnorable()) {
                    return null;
                }
View Full Code Here


            if (a2 instanceof Assertion) {
                Assertion assertion = findCompatibleAssertion((Assertion)a2, alt1, remove);
                if (assertion != null) {
                    all.addPolicyComponent(assertion);
                } else if (!strict && ((Assertion)a2).isIgnorable()) {
                    all.addPolicyComponent(a2);
                } else if (strict || !((Assertion)a2).isIgnorable()) {
                    return null;
                }
            }
        }
View Full Code Here

        if (isOptional()) {
            Policy policy = new Policy();
            ExactlyOne exactlyOne = new ExactlyOne();

            All all = new All();
            all.addPolicyComponent(clone(false));
            exactlyOne.addPolicyComponent(all);
            exactlyOne.addPolicyComponent(new All());
            policy.addPolicyComponent(exactlyOne);

            return policy;
View Full Code Here

            }
            attr = el.getAttributeNodeNS(Constants.URI_POLICY_15_NS, Constants.ATTR_OPTIONAL);
            if (attr != null) {
                el.removeAttributeNode(attr);
            }
            all.addPolicyComponent(new XmlPrimitiveAssertion(el));
            exactlyOne.addPolicyComponent(all);

            exactlyOne.addPolicyComponent(new All());
            policy.addPolicyComponent(exactlyOne);
View Full Code Here

            parts.addHeader(new Header("FaultTo", addrNamespace));
            parts.addHeader(new Header("ReplyTo", addrNamespace));
            parts.addHeader(new Header("Action", addrNamespace));
            parts.addHeader(new Header("MessageID", addrNamespace));
            parts.addHeader(new Header("RelatesTo", addrNamespace));
            all.addPolicyComponent(parts);
           
            client.getRequestContext().put(PolicyConstants.POLICY_OVERRIDE, cancelPolicy);
        }
       
        if (isSecureConv) {
View Full Code Here

        ExactlyOne ea = new ExactlyOne();
        p.addPolicyComponent(ea);
        All all = new All();

        for (Token token : getTokens()) {
            all.addPolicyComponent(token);
        }
       
        if (signedParts != null) {
            all.addPolicyComponent(signedParts);
        } else if (signedElements != null) {
View Full Code Here

        for (Token token : getTokens()) {
            all.addPolicyComponent(token);
        }
       
        if (signedParts != null) {
            all.addPolicyComponent(signedParts);
        } else if (signedElements != null) {
            all.addPolicyComponent(signedElements);
        } else if (encryptedParts != null) {
            all.addPolicyComponent(encryptedParts);
        } else if (encryptedElements != null) {
View Full Code Here

        }
       
        if (signedParts != null) {
            all.addPolicyComponent(signedParts);
        } else if (signedElements != null) {
            all.addPolicyComponent(signedElements);
        } else if (encryptedParts != null) {
            all.addPolicyComponent(encryptedParts);
        } else if (encryptedElements != null) {
            all.addPolicyComponent(encryptedElements);
        }       
View Full Code Here

        if (signedParts != null) {
            all.addPolicyComponent(signedParts);
        } else if (signedElements != null) {
            all.addPolicyComponent(signedElements);
        } else if (encryptedParts != null) {
            all.addPolicyComponent(encryptedParts);
        } else if (encryptedElements != null) {
            all.addPolicyComponent(encryptedElements);
        }       
       
        ea.addPolicyComponent(all);
View Full Code Here

        } else if (signedElements != null) {
            all.addPolicyComponent(signedElements);
        } else if (encryptedParts != null) {
            all.addPolicyComponent(encryptedParts);
        } else if (encryptedElements != null) {
            all.addPolicyComponent(encryptedElements);
        }       
       
        ea.addPolicyComponent(all);
        Policy pc = p.normalize(builder.getPolicyRegistry(), true);
        if (pc != null) {
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.