Package org.apache.neethi

Examples of org.apache.neethi.Policy.normalize()


        InitiatorEncryptionToken initiatorToken = new InitiatorEncryptionToken(consts, builder);
        initiatorToken.setOptional(PolicyConstants.isOptional(element));
        initiatorToken.setIgnorable(PolicyConstants.isIgnorable(element));

        Policy policy = builder.getPolicy(DOMUtils.getFirstElement(element));
        policy = (Policy)policy.normalize(builder.getPolicyRegistry(), false);

        for (Iterator iterator = policy.getAlternatives(); iterator.hasNext();) {
            processAlternative((List)iterator.next(), initiatorToken);
            break; // TODO process all the token that must be set ..
        }
View Full Code Here


                            operationPolicy.setSoapMessageVersionNamespace(WSSConstants.NS_SOAP12);
                        }
                    }

                    Policy policy = getPolicy(service, port, binding, bindingOperation, operation);
                    operationPolicy.setPolicy(policy.normalize(true));
                }
            }
        }
        return operationPolicyList;
    }
View Full Code Here

      kerberosToken.setInclusion(inclusion);
    }

    if (policyElement != null) {
      Policy policy = PolicyEngine.getPolicy(element.getFirstElement());
      policy = (Policy) policy.normalize(false);
      for (Iterator iterator = policy.getAlternatives(); iterator.hasNext();) {
        processAlternative((List) iterator.next(), kerberosToken);
        /*
         * since there should be only one alternative
         */
 
View Full Code Here

        OMElement policyElement = element.getFirstChildWithName(org.apache.neethi.Constants.Q_ELEM_POLICY);

        if (policyElement != null) {

            Policy policy = PolicyEngine.getPolicy(policyElement);
            policy = (Policy) policy.normalize(false);

            for (Iterator iterator = policy.getAlternatives(); iterator
                    .hasNext();) {
                processAlternative((List) iterator.next(), issuedToken);
                break; // since there should be only one alternative ..
View Full Code Here

      kerberosToken.setInclusion(inclusion);
    }

    if (policyElement != null) {
      Policy policy = PolicyEngine.getPolicy(element.getFirstElement());
      policy = (Policy) policy.normalize(false);
      for (Iterator iterator = policy.getAlternatives(); iterator.hasNext();) {
        processAlternative((List) iterator.next(), kerberosToken);
        /*
         * since there should be only one alternative
         */
 
View Full Code Here

        OMElement policyElement = element.getFirstChildWithName(org.apache.neethi.Constants.Q_ELEM_POLICY);

        if (policyElement != null) {

            Policy policy = PolicyEngine.getPolicy(policyElement);
            policy = (Policy) policy.normalize(false);

            for (Iterator iterator = policy.getAlternatives(); iterator
                    .hasNext();) {
                processAlternative((List) iterator.next(), issuedToken);
                break; // since there should be only one alternative ..
View Full Code Here

                            operationPolicy.setSoapMessageVersionNamespace(WSSConstants.NS_SOAP12);
                        }
                    }

                    Policy policy = getPolicy(service, port, binding, bindingOperation, operation);
                    operationPolicy.setPolicy(policy.normalize(true));
                }
            }
        }
        return operationPolicyList;
    }
View Full Code Here

        String normalizedPolicyReferenceFile = loadPolicyFile("policy/WSP15_432-normalized.xml");
        Policy policy = loadPolicy(policyFile);
        String serializedPolicy = serializePolicy(policy);
        assertXMLisEqual(serializedPolicy, serializedPolicyReferenceFile);

        policy = policy.normalize(true);
        Iterator<List<Assertion>> iterator = policy.getAlternatives();
        int count = 0;
        while (iterator.hasNext()) {
            iterator.next();
            count++;
View Full Code Here

        if (policyElement != null
                && policyElement.getQName().equals(
                        org.apache.neethi.Constants.Q_ELEM_POLICY)) {

            Policy policy = PolicyEngine.getPolicy(policyElement);
            policy = (Policy) policy.normalize(false);

            for (Iterator iterator = policy.getAlternatives(); iterator
                    .hasNext();) {
                processAlternative((List) iterator.next(), issuedToken);
                break; // since there should be only one alternative ..
View Full Code Here

        OMElement policyElement = element.getFirstElement();
       
        if (policyElement != null && !policyElement.getQName().equals(org.apache.neethi.Constants.Q_ELEM_POLICY)) {
       
            Policy policy = PolicyEngine.getPolicy(element.getFirstElement());
            policy = (Policy) policy.normalize(false);
           
            for (Iterator iterator = policy.getAlternatives(); iterator.hasNext();) {
                processAlternative((List) iterator.next(), usernameToken);
               
                /*
 
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.