Package org.apache.neethi

Examples of org.apache.neethi.PolicyComponent


            ArrayList policyComponents = new ArrayList();

            // process <wsp:Policy> elements ..
            for (Iterator policyElements = PolicyUtil.getPolicyChildren(attachmentElement);
                    policyElements.hasNext();) {
                PolicyComponent policy = PolicyUtil
                        .getPolicyFromOMElement((OMElement)policyElements
                                .next());
                policyComponents.add(policy);
            }

            // process <wsp:PolicyReference> elements ..
            for (Iterator policyRefElements = PolicyUtil.getPolicyRefChildren(attachmentElement);
                    policyRefElements.hasNext();) {
                PolicyComponent policyRef = PolicyUtil
                        .getPolicyReferenceFromOMElement((OMElement)policyRefElements
                                .next());
                policyComponents.add(policyRef);
            }
View Full Code Here


            buf.append(" (");
            buf.append((Assertion)pc);
            buf.append(")");
            nl(buf);
            if (pc instanceof NestedPrimitiveAssertion) {
                PolicyComponent nested = ((NestedPrimitiveAssertion)pc).getPolicy();
                level++;
                printPolicyComponent(nested, buf, level);
                level--;               
            }
        } else {
View Full Code Here

            buf.append(" (");
            buf.append((Assertion)pc);
            buf.append(")");
            nl(buf);
            if (pc instanceof PolicyContainingAssertion) {
                PolicyComponent nested = ((PolicyContainingAssertion)pc).getPolicy();
                level++;
                printPolicyComponent(nested, buf, level);
                level--;               
            }
        } else {
View Full Code Here

        } else if (encryptedElements != null) {
            all.addPolicyComponent(encryptedElements);
        }       
       
        ea.addPolicyComponent(all);
        PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
        if (pc instanceof Policy) {
            return (Policy)pc;
        } else {
            p = new Policy();
            p.addPolicyComponent(pc);
View Full Code Here

        }
        if (getLayout() != null) {
            all.addPolicyComponent(getLayout());
        }
        ea.addPolicyComponent(all);
        PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
        if (pc instanceof Policy) {
            return (Policy)pc;
        } else {
            p = new Policy();
            p.addPolicyComponent(pc);
View Full Code Here

        }
        if (getLayout() != null) {
            all.addPolicyComponent(getLayout());
        }
        ea.addPolicyComponent(all);
        PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
        if (pc instanceof Policy) {
            return (Policy)pc;
        } else {
            p = new Policy();
            p.addPolicyComponent(pc);
View Full Code Here

            all.addPolicyComponent(getLayout());
        }

       
        ea.addPolicyComponent(all);
        PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
        if (pc instanceof Policy) {
            return (Policy)pc;
        } else {
            p = new Policy();
            p.addPolicyComponent(pc);
View Full Code Here

            ExactlyOne ea = new ExactlyOne();
            p.addPolicyComponent(ea);
            All all = new All();
            all.addPolicyComponent(token);
            ea.addPolicyComponent(all);
            PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
            if (pc instanceof Policy) {
                return (Policy)pc;
            } else {
                p = new Policy();
                p.addPolicyComponent(pc);
View Full Code Here

        if (arg1.size() != arg2.size()) {
            return false;
        }

        Iterator iterator = arg1.iterator();
        PolicyComponent assertion1;

        while (iterator.hasNext()) {
            assertion1 = (PolicyComponent) iterator.next();

            Iterator iterator2 = arg2.iterator();
            boolean match = false;
            PolicyComponent assertion2;

            while (iterator2.hasNext()) {
                assertion2 = (PolicyComponent) iterator2.next();
                if (compare(assertion1, assertion2)) {
                    match = true;
View Full Code Here

            PolicyOperator policyOperator = (PolicyOperator) policyComponent;
            List<PolicyComponent> policyComponents = policyOperator.getPolicyComponents();
            int alternative = 0;
            Iterator<PolicyComponent> policyComponentIterator = policyComponents.iterator();
            while (policyComponentIterator.hasNext()) {
                PolicyComponent curPolicyComponent = policyComponentIterator.next();
                if (policyOperator instanceof ExactlyOne) {
                    assertionStateMap.add(new HashMap<SecurityEventConstants.Event, Map<Assertion, List<Assertable>>>());
                    buildAssertionStateMap(curPolicyComponent, assertionStateMap, alternative++);
                } else {
                    buildAssertionStateMap(curPolicyComponent, assertionStateMap);
View Full Code Here

TOP

Related Classes of org.apache.neethi.PolicyComponent

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.