Package org.apache.neethi

Examples of org.apache.neethi.PolicyReference


            }
            return;
        }
   
        if (Constants.TYPE_POLICY_REF == pc.getType()) {
            PolicyReference pr = (PolicyReference)pc;
            pc = pr.normalize(registry, false);
        }

        PolicyOperator po = (PolicyOperator)pc;

        List<PolicyComponent> pcs = CastUtils.cast(po.getPolicyComponents(), PolicyComponent.class);
View Full Code Here


                    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

                } 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)
                    || PORT_TYPE_OPERATION.equals(origin)
                    || PORT_TYPE_OPERATION_INPUT.equals(origin)
                    || PORT_TYPE_OPERATION_OUTPUT.equals(origin)) {
View Full Code Here

    }

    protected void processPolicyRefElements(Iterator policyRefElements,
                                            PolicySubject policySubject) {
        while (policyRefElements.hasNext()) {
            PolicyReference policyReference = PolicyEngine
                    .getPolicyReference((OMElement) policyRefElements.next());
            policySubject.attachPolicyReference(policyReference);
        }
    }
View Full Code Here

    return sbuf.toString();
  }

  public static PolicyReference createPolicyReference(Policy policy) {
    PolicyReference policyReference = new PolicyReference();
    String key = policy.getName();
    if (key == null) {
      key = policy.getId();
      if (key == null) {
        key = UIDGenerator.generateUID();
        policy.setId(key);
      }
      policyReference.setURI("#" + key);
    } else {
      policyReference.setURI(key);
    }
    return policyReference;
  }
View Full Code Here

      if (policyElement instanceof Policy) {
        policy = (policy == null) ? (Policy) policyElement
            : (Policy) policy.merge((Policy) policyElement);

      } else {
        PolicyReference policyReference = (PolicyReference) policyElement;
        Policy policy2 = (Policy) policyReference.normalize(
            new AxisPolicyLocator(description), false);
        policy = (policy == null) ? policy2 : (Policy) policy
            .merge(policy2);
      }
    }
View Full Code Here

      if (policyElement instanceof Policy) {
        policy = (policy == null) ? (Policy) policyElement
            : (Policy) policy.merge((Policy) policyElement);

      } else {
        PolicyReference policyReference = (PolicyReference) policyElement;
        Policy policy2 = (Policy) policyReference.normalize(
            new PolicyLocator(service), false);
        policy = (policy == null) ? policy2 : (Policy) policy
            .merge(policy2);
      }
    }
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

    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

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.