Package com.sun.xml.ws.policy.sourcemodel.wspolicy

Examples of com.sun.xml.ws.policy.sourcemodel.wspolicy.NamespaceVersion


    }

    private PolicySourceModel initializeNewModel(final StartElement element) throws PolicyException, XMLStreamException {
        PolicySourceModel model;

        final NamespaceVersion nsVersion = NamespaceVersion.resolveVersion(element.getName().getNamespaceURI());

        final Attribute policyName = getAttributeByName(element, nsVersion.asQName(XmlToken.Name));
        final Attribute xmlId = getAttributeByName(element, PolicyConstants.XML_ID);
        Attribute policyId = getAttributeByName(element, PolicyConstants.WSU_ID);

        if (policyId == null) {
            policyId = xmlId;
View Full Code Here


       
        // check for "null" and "empty" policy: if such policy is found return "null" policy,
        // or if all policies are "empty", return "empty" policy
        boolean found = false;
        boolean allPoliciesEmpty = true;
        NamespaceVersion latestVersion = null;
        for (Policy tested : policies) {
            if (tested.isEmpty()) {
                found = true;
            } else {
                if (tested.isNull()) {
                    found = true;
                }
                allPoliciesEmpty = false;
            }
            if (latestVersion == null) {
                latestVersion = tested.getNamespaceVersion();
            } else if (latestVersion.compareTo(tested.getNamespaceVersion()) < 0) {
                latestVersion = tested.getNamespaceVersion();
            }
           
            if (found && !allPoliciesEmpty) {
                return Policy.createNullPolicy(latestVersion, null, null);
View Full Code Here

            return policies.iterator().next();
        }
       
        final Collection<Collection<AssertionSet>> alternativeSets = new LinkedList<Collection<AssertionSet>>();
        final StringBuilder id = new StringBuilder();
        NamespaceVersion mergedVersion = policies.iterator().next().getNamespaceVersion();
        for (Policy policy : policies) {
            alternativeSets.add(policy.getContent());
            if (mergedVersion.compareTo(policy.getNamespaceVersion()) < 0) {
                mergedVersion = policy.getNamespaceVersion();
            }
            final String policyId = policy.getId();
            if (policyId != null) {
                if (id.length() > 0) {
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.policy.sourcemodel.wspolicy.NamespaceVersion

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.