Package org.apache.neethi

Examples of org.apache.neethi.PolicyReference


                    loadedPolicies.add(builder.getPolicy(e));
                }
            }
            if (null != policyReferenceElements) {
                for (Element e : policyReferenceElements) {
                    PolicyReference pr = builder.getPolicyReference(e);
                    Policy resolved = resolveReference(pr, e, builder, bus);
                    if (null != resolved) {
                        loadedPolicies.add(resolved);
                    }
                }
View Full Code Here


                   
                    // cache the element so it can be used when generating the wsdl
                    attachment.setElement((Element) nd);

                } else if (Constants.isPolicyRef(qn)) {
                    PolicyReference ref = builder.getPolicyReference(nd);
                    if (null != ref) {  
                        Policy p = resolveReference(ref, doc);
                        if (null != attachment.getPolicy()) {
                            p = p.merge(attachment.getPolicy());
                        }
View Full Code Here

            Object obj = iterator.next();
            if (obj instanceof Policy) {
                Policy policy = (Policy) obj;
                parent.addChild((PolicyUtil.getPolicyAsOMElement(policy)));
            } else if (obj instanceof PolicyReference) {
                PolicyReference policyReference = (PolicyReference) obj;
                Policy policy = policyRegistry.lookup(policyReference.getURI());
                if (policy == null) {
                    log.error(ServiceArchiveCreator.class.getName()
                              + "policy object couldn't be NULL");
                    continue;
                }
View Full Code Here

            Object policyElement = iterator.next();
            if (policyElement instanceof Policy) {
                policy = (policy == null) ? (Policy) policyElement
                                          : policy.merge((Policy) policyElement);
            } else {
                PolicyReference policyReference = (PolicyReference) policyElement;

                String key = policyReference.getURI();
                int pos = key.indexOf("#");
                if (pos == 0) {
                    key = key.substring(1);
                } else if (pos > 0) {
                    key = key.substring(0, pos);
View Full Code Here

    Collection attachPolicyComponents = policySubject
        .getAttachedPolicyComponents();

        for (Object policyElement : attachPolicyComponents) {
            if (policyElement instanceof Policy) {
                PolicyReference policyReference =
                        PolicyUtil.createPolicyReference((Policy)policyElement);
                OMElement policyRefElement =
                        PolicyUtil.getPolicyComponentAsOMElement(policyReference, serializer);

                OMNode firstChildElem = wsdlElement.getFirstElement();
                if (firstChildElem == null) {
                    wsdlElement.addChild(policyRefElement);
                } else {
                    firstChildElem.insertSiblingBefore(policyRefElement);
                }
                String key = policyReference.getURI();
                if (key.startsWith("#")) {
                    key = key.substring(key.indexOf("#") + 1);
                }
                addPolicyToDefinitionElement(key, (Policy)policyElement);
View Full Code Here

        for (Object policyElement : policyList) {
            if (policyElement instanceof Policy) {
                policy = (policy == null) ?
                        (Policy) policyElement : policy.merge((Policy) policyElement);
            } else {
                PolicyReference policyReference = (PolicyReference) policyElement;
                String key = policyReference.getURI();
                int pos = key.indexOf("#");
                if (pos == 0) {
                    key = key.substring(1);
                } else if (pos > 0) {
                    key = key.substring(0, pos);
View Full Code Here

            if (value instanceof Policy) {
                Policy policy = (Policy) value;
                policyList.add(PolicyUtil.getPolicyAsString(policy));
            } else if (value instanceof PolicyReference) {

                PolicyReference policyReference = (PolicyReference) value;
                Policy policy = registry.lookup(policyReference.getURI());

                if (policy == null) {
                    throw new RuntimeException(policyReference.getURI() +
                                               " cannot be resolved");
                }
                policyList.add(PolicyUtil.getPolicyAsString(policy));
            }
        }
View Full Code Here

                } else if (WSDLConstants.WSDL11Constants.POLICY_REFERENCE
                        .equals(type)) {
                    if (isTraceEnabled) {
                        log.trace("copyExtensibleElements:: PolicyReference found " + unknown);
                    }
                    PolicyReference policyReference = (PolicyReference) PolicyUtil
                            .getPolicyComponent(unknown.getElement());
                    description.getPolicySubject().attachPolicyReference(policyReference);
                   
//                    int attachmentScope =
//                            getPolicyAttachmentPoint(description, originOfExtensibilityElements);
View Full Code Here

                String policyURIs = value.getLocalPart();

                if (policyURIs.length() != 0) {
                    String[] uris = policyURIs.split(" ");

                    PolicyReference ref;
                    for (int i = 0; i < uris.length; i++) {
                        ref = new PolicyReference();
                        ref.setURI(uris[i]);

                        if (PORT_TYPE.equals(origin)) {
                            PolicyInclude include = description
                                    .getPolicyInclude();
                            include.addPolicyRefElement(
View Full Code Here

    for (Iterator iterator = attachPolicyComponents.iterator(); iterator
        .hasNext();) {
      Object policyElement = iterator.next();

      if (policyElement instanceof Policy) {
        PolicyReference policyReference = PolicyUtil
            .createPolicyReference((Policy) policyElement);
        OMElement policyRefElement = PolicyUtil
            .getPolicyComponentAsOMElement(
                (PolicyComponent) policyReference, filter);
View Full Code Here

TOP

Related Classes of org.apache.neethi.PolicyReference

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.