Package org.apache.ws.policy

Examples of org.apache.ws.policy.Policy


            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

            Policy newPolicy = prdr.readPolicy(fis);
            newPolicy = (Policy) newPolicy.normalize();

            if (merged == null) {
                merged = newPolicy;
            } else {
                merged = (Policy) merged.merge(newPolicy);
View Full Code Here


  }
 
  public static SandeshaPropertyBean loadPropertiesFromModuleDescPolicy(AxisModule desc, SandeshaPropertyBean parentPropertyBean) throws SandeshaException {
    SandeshaPropertyBean propertyBean = new SandeshaPropertyBean ();
   
    Policy policy = desc.getPolicyInclude().getEffectivePolicy();

    if (policy == null) {
      return null; //no pilicy is available in the module description
    }
View Full Code Here

  }

  public static SandeshaPropertyBean loadPropertiesFromAxisDescription(AxisDescription desc, SandeshaPropertyBean parentPropertyBean)
      throws SandeshaException {
    SandeshaPropertyBean propertyBean = new SandeshaPropertyBean ();
    Policy policy = desc.getPolicyInclude().getEffectivePolicy();

    if (policy == null) {
      return null; //no policy is available in this axis description
    }
View Full Code Here

            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

            Policy newPolicy = prdr.readPolicy(fis);
            newPolicy = (Policy) newPolicy.normalize();

            if (merged == null) {
                merged = newPolicy;
            } else {
                merged = (Policy) merged.merge(newPolicy);
View Full Code Here

                                         PolicyInclude policyInclude) {
        OMPolicyReader reader = (OMPolicyReader) PolicyFactory
                .getPolicyReader(PolicyFactory.OM_POLICY_READER);

        while (policyElements.hasNext()) {
            Policy p = reader.readPolicy((OMElement) policyElements.next());
            policyInclude.addPolicyElement(type, p);
        }
    }
View Full Code Here

    }
  }

  public static void writePolicy(PolicyInclude policy, OutputStream out) {
    if (policy != null) {
      Policy pl = policy.getEffectivePolicy();
      if (pl != null) {
        PolicyWriter write = PolicyFactory
            .getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
        write.writePolicy(pl, out);
        try {
View Full Code Here

 
  public void configureOperationPolices(AxisOperation op)throws AxisFault{
    PolicyInclude policyInclude = op.getPolicyInclude();
   
    if(policyInclude != null ){
      Policy policy = policyInclude.getEffectivePolicy();
      if(policy != null){
        if (!policy.isNormalized()) {
          policy = (Policy) policy.normalize();
        }

        XorCompositeAssertion XOR = (XorCompositeAssertion) policy.getTerms()
            .get(0);
        AndCompositeAssertion AND = (AndCompositeAssertion) XOR.getTerms().get(
            0);
       
        Iterator pAsserations = AND.getTerms().iterator();
View Full Code Here

        List wsdlPolicies = getPoliciesAsExtElements(wsdlDefinition
                .getExtensibilityElements());
        Iterator wsdlPolicyIterator = wsdlPolicies.iterator();

        while (wsdlPolicyIterator.hasNext()) {
            Policy wsdlPolicy = (Policy) wsdlPolicyIterator.next();

            if (wsdlPolicy.getPolicyURI() != null) {
                policyInclude.registerPolicy(wsdlPolicy);
            }
        }

        // /////////////////////////////////////////////////////////////////
View Full Code Here

    return null;
  }

  private void calculatePolicy() {

    Policy result = null;
    Iterator iterator = wrapperElements.values().iterator();

    while (iterator.hasNext()) {
      Object policyElement = ((Wrapper) iterator.next()).getValue();
      Policy p;

      if (policyElement instanceof PolicyReference) {
        p = (Policy) ((PolicyReference) policyElement)
            .normalize(getPolicyRegistry());

      } else if (policyElement instanceof Policy) {
        p = (Policy) policyElement;

      } else {
        // TODO AxisFault?
        throw new RuntimeException();
      }

      result = (result == null) ? (Policy) p.normalize(reg)
          : (Policy) result.merge(p, reg);
    }
    this.policy = result;
    useCacheP(true);
  }
View Full Code Here

    this.policy = result;
    useCacheP(true);
  }

  private void calculateEffectivePolicy() {
    Policy result ;
   
    if (getParent() != null) {
      Policy parentPolicy = getParent().getEffectivePolicy();
     
      if (parentPolicy == null) {
        result = getPolicy();
       
      } else {
       
        if (getPolicy() != null) {
          result = (Policy) parentPolicy.merge(getPolicy(), reg);
         
        } else {
          result = parentPolicy;
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.ws.policy.Policy

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.