/** * @deprecated As of 1.4 release. You can't override a policies that * applicable for the current policy scope via * {@link PolicyInclude #setEffectivePolicy(Policy)}. In case * you need to make a policy the only policy that is within the * policy cache of an {@link AxisDescription} please use * {@link PolicySubject #clear()} and * {@link PolicySubject #attachPolicy(Policy)} accordingly. * */ public void setEffectivePolicy(Policy effectivePolicy) { this.effectivePolicy = effectivePolicy; if (description != null && effectivePolicy != null) { description.getPolicySubject().clear(); description.getPolicySubject().attachPolicy(effectivePolicy); } }
/** * @deprecated As of 1.4 release. You can't override a policies that * applicable for the current policy scope via * {@link PolicyInclude #setEffectivePolicy(Policy)}. In case * you need to make a policy the only policy that is within the * policy cache of an {@link AxisDescription} please use * {@link PolicySubject #clear()} and * {@link PolicySubject #attachPolicy(Policy)} accordingly. * */ public void setEffectivePolicy(Policy effectivePolicy) { this.effectivePolicy = effectivePolicy; if (description != null && effectivePolicy != null) { description.getPolicySubject().clear(); description.getPolicySubject().attachPolicy(effectivePolicy); } }
/** * This method sets the policy as the default of this AxisDescription instance. Further more * this method does the followings. <p/> (1) Engage whatever modules necessary to execute new * the effective policy of this AxisDescription instance. (2) Disengage whatever modules that * are not necessary to execute the new effective policy of this AxisDescription instance. (3) * Check whether each module can execute the new effective policy of this AxisDescription * instance. (4) If not throw an AxisFault to notify the user. (5) Else notify each module about * the new effective policy. * * @param policy the new policy of this AxisDescription instance. The effective policy is the * merge of this argument with effective policy of parent of this * AxisDescription. * @throws AxisFault if any module is unable to execute the effective policy of this * AxisDescription instance successfully or no module to execute some portion * (one or more PrimtiveAssertions ) of that effective policy. */ public void applyPolicy(Policy policy) throws AxisFault { // sets AxisDescription policy getPolicySubject().clear(); getPolicySubject().attachPolicy(policy); /* * now we try to engage appropriate modules based on the merged policy * of axis description object and the corresponding axis binding * description object. */ applyPolicy(); }
/** * This method sets the policy as the default of this AxisDescription instance. Further more * this method does the followings. <p/> (1) Engage whatever modules necessary to execute new * the effective policy of this AxisDescription instance. (2) Disengage whatever modules that * are not necessary to execute the new effective policy of this AxisDescription instance. (3) * Check whether each module can execute the new effective policy of this AxisDescription * instance. (4) If not throw an AxisFault to notify the user. (5) Else notify each module about * the new effective policy. * * @param policy the new policy of this AxisDescription instance. The effective policy is the * merge of this argument with effective policy of parent of this * AxisDescription. * @throws AxisFault if any module is unable to execute the effective policy of this * AxisDescription instance successfully or no module to execute some portion * (one or more PrimtiveAssertions ) of that effective policy. */ public void applyPolicy(Policy policy) throws AxisFault { // sets AxisDescription policy getPolicySubject().clear(); getPolicySubject().attachPolicy(policy); /* * now we try to engage appropriate modules based on the merged policy * of axis description object and the corresponding axis binding * description object. */ applyPolicy(); }
/** * @param policy * @see org.apache.axis2.description.PolicySubject#attachPolicy(Policy) * @see org.apache.axis2.description.PolicySubject#clear() * @deprecated As of 1.4 release, replaced by * {@link PolicySubject #attachPolicy(Policy)} Use * {@link PolicySubject #clear()} beforehand effective policy of * {@link AxisDescription} has to be set as the argument. * */ public void setPolicy(Policy policy) { wrapperElements.clear(); if (policy.getName() == null && policy.getId() == null) { policy.setId(UIDGenerator.generateUID()); } Wrapper wrapper = new Wrapper(PolicyInclude.ANON_POLICY, policy); if (policy.getName() != null) { wrapperElements.put(policy.getName(), wrapper); } else { wrapperElements.put(policy.getId(), wrapper); } if (description != null) { description.getPolicySubject().clear(); description.getPolicySubject().attachPolicy(policy); } }
/** * @param policy * @see org.apache.axis2.description.PolicySubject#attachPolicy(Policy) * @see org.apache.axis2.description.PolicySubject#clear() * @deprecated As of 1.4 release, replaced by * {@link PolicySubject #attachPolicy(Policy)} Use * {@link PolicySubject #clear()} beforehand effective policy of * {@link AxisDescription} has to be set as the argument. * */ public void setPolicy(Policy policy) { wrapperElements.clear(); if (policy.getName() == null && policy.getId() == null) { policy.setId(UIDGenerator.generateUID()); } Wrapper wrapper = new Wrapper(PolicyInclude.ANON_POLICY, policy); if (policy.getName() != null) { wrapperElements.put(policy.getName(), wrapper); } else { wrapperElements.put(policy.getId(), wrapper); } if (description != null) { description.getPolicySubject().clear(); description.getPolicySubject().attachPolicy(policy); } }