/** * @deprecated As of 1.4 release. If you need to calculate merged policy of * all policies that are in the policy cache of * {@link AxisDescription}, use * {@link PolicySubject #getAttachedPolicyComponents() and {@link org.PolicyUtil #getMergedPolicy(List, AxisDescription)}} */ public Policy getPolicy() { if (description != null) { ArrayList<PolicyComponent> policyList = new ArrayList<PolicyComponent>(description.getPolicySubject() .getAttachedPolicyComponents()); return PolicyUtil.getMergedPolicy(policyList, description); } calculatePolicy(); return policy; }
.createPolicyReference((Policy) policyElement); OMElement policyRefElement = PolicyUtil .getPolicyComponentAsOMElement( (PolicyComponent) policyReference, filter); .getPolicyComponentAsOMElement((PolicyComponent) policyElement); OMElement firstChildElem = descriptionElement.getFirstElement();
private void processMessages(Iterator messages, AxisOperation operation) throws DeploymentException { while (messages.hasNext()) { OMElement messageElement = (OMElement) messages.next(); OMAttribute label = messageElement .getAttribute(new QName(TAG_LABEL)); if (label == null) { throw new DeploymentException(Messages .getMessage("messagelabelcannotfound")); } AxisMessage message = operation.getMessage(label .getAttributeValue()); Iterator parameters = messageElement.getChildrenWithName(new QName( TAG_PARAMETER)); // processing <wsp:Policy> .. </..> elements Iterator policyElements = PolicyUtil.getPolicyChildren(messageElement); if (policyElements != null) { processPolicyElements(policyElements, message.getPolicySubject()); } // processing <wsp:PolicyReference> .. </..> elements Iterator policyRefElements = PolicyUtil.getPolicyRefChildren(messageElement); if (policyRefElements != null) { processPolicyRefElements(policyRefElements, message.getPolicySubject()); } processParameters(parameters, message, operation); } }
for (Iterator policyElements = PolicyUtil.getPolicyChildren(attachmentElement); policyElements.hasNext();) { PolicyComponent policy = PolicyUtil .getPolicyFromOMElement((OMElement)policyElements .next()); policyComponents.add(policy); for (Iterator policyRefElements = PolicyUtil.getPolicyRefChildren(attachmentElement); policyRefElements.hasNext();) { PolicyComponent policyRef = PolicyUtil .getPolicyReferenceFromOMElement((OMElement)policyRefElements .next()); policyComponents.add(policyRef);
try { addAttribute(doc, "policy", PolicyUtil.getSafeString(PolicyUtil.policyComponentToString(policy)), outputElt); } catch (Exception ex) {
protected void addPoliciesToDescriptionElement(List policies, OMElement descriptionElement) throws XMLStreamException, FactoryConfigurationError { for (int i = 0; i < policies.size(); i++) { Policy policy = (Policy) policies.get(i); OMElement policyElement = PolicyUtil.getPolicyComponentAsOMElement( policy, filter); OMNode firstChild = descriptionElement.getFirstOMChild(); if (firstChild != null) { firstChild.insertSiblingBefore(policyElement); } else { descriptionElement.addChild(policyElement); } } }
if (Constants.isPolicyElement(unknown.getElementType())) { policy = (Policy) PolicyUtil.getPolicyComponent(unknown.getElement()); String key; if ((key = policy.getName()) != null || (key = policy.getId()) != null) {
protected void addPoliciesToDefinitionElement(Iterator iterator, OMElement definitionElement) throws Exception { Policy policy; OMElement policyElement; OMNode firstChild; for (; iterator.hasNext();) { policy = (Policy) iterator.next(); policyElement = PolicyUtil.getPolicyComponentAsOMElement(policy, serializer); firstChild = definition.getFirstOMChild(); if (firstChild != null) { firstChild.insertSiblingBefore(policyElement); } else { definitionElement.addChild(policyElement); } } }
for (Iterator policyElements = PolicyUtil.getPolicyChildren(attachmentElement); policyElements.hasNext();) { PolicyComponent policy = PolicyUtil .getPolicyFromOMElement((OMElement)policyElements .next()); policyComponents.add(policy); for (Iterator policyRefElements = PolicyUtil.getPolicyRefChildren(attachmentElement); policyRefElements.hasNext();) { PolicyComponent policyRef = PolicyUtil .getPolicyReferenceFromOMElement((OMElement)policyRefElements .next()); policyComponents.add(policyRef);
try { addAttribute(doc, "policy", PolicyUtil.getSafeString(PolicyUtil.policyComponentToString(policy)), outputElt); } catch (Exception ex) {
if (Constants.isPolicyElement(unknown.getElementType())) { policy = (Policy) PolicyUtil.getPolicyComponent(unknown.getElement()); String key; if ((key = policy.getName()) != null || (key = policy.getId()) != null) {
/** * @deprecated As of 1.4 release. If you need to calculate merged policy of * all policies that are in the policy cache of * {@link AxisDescription}, use * {@link PolicySubject #getAttachedPolicyComponents() and {@link org.PolicyUtil #getMergedPolicy(List, AxisDescription)}} */ public Policy getPolicy() { if (description != null) { ArrayList<PolicyComponent> policyList = new ArrayList<PolicyComponent>(description.getPolicySubject() .getAttachedPolicyComponents()); return PolicyUtil.getMergedPolicy(policyList, description); } calculatePolicy(); return policy; }
private void processMessages(Iterator messages, AxisOperation operation) throws DeploymentException { while (messages.hasNext()) { OMElement messageElement = (OMElement) messages.next(); OMAttribute label = messageElement .getAttribute(new QName(TAG_LABEL)); if (label == null) { throw new DeploymentException(Messages .getMessage("messagelabelcannotfound")); } AxisMessage message = operation.getMessage(label .getAttributeValue()); Iterator<OMElement> parameters = messageElement.getChildrenWithName(new QName( TAG_PARAMETER)); // processing <wsp:Policy> .. </..> elements Iterator<OMElement> policyElements = PolicyUtil.getPolicyChildren(messageElement); if (policyElements != null) { processPolicyElements(policyElements, message.getPolicySubject()); } // processing <wsp:PolicyReference> .. </..> elements Iterator<OMElement> policyRefElements = PolicyUtil.getPolicyRefChildren(messageElement); if (policyRefElements != null) { processPolicyRefElements(policyRefElements, message.getPolicySubject()); } processParameters(parameters, message, operation); } }
.createPolicyReference((Policy) policyElement); OMElement policyRefElement = PolicyUtil .getPolicyComponentAsOMElement( (PolicyComponent) policyReference, filter); .getPolicyComponentAsOMElement((PolicyComponent) policyElement); OMElement firstChildElem = descriptionElement.getFirstElement();
protected void addPoliciesToDescriptionElement(List policies, OMElement descriptionElement) throws XMLStreamException, FactoryConfigurationError { for (int i = 0; i < policies.size(); i++) { Policy policy = (Policy) policies.get(i); OMElement policyElement = PolicyUtil.getPolicyComponentAsOMElement( policy, filter); OMNode firstChild = descriptionElement.getFirstOMChild(); if (firstChild != null) { firstChild.insertSiblingBefore(policyElement); } else { descriptionElement.addChild(policyElement); } } }
try { addAttribute(doc, "policy", PolicyUtil.getSafeString(PolicyUtil.policyComponentToString(policy)), inputElt); } catch (Exception ex) {
log.trace("copyExtensibleElements:: PolicyElement found " + unknown); Policy policy = (Policy) PolicyUtil.getPolicyComponent(unknown.getElement()); description.getPolicySubject().attachPolicy(policy); .getPolicyComponent(unknown.getElement()); description.getPolicySubject().attachPolicyReference(policyReference);
public Policy getEffectivePolicy() { Collection<PolicyComponent> policyList = new ArrayList<PolicyComponent>(); policyList.addAll(getPolicySubject().getAttachedPolicyComponents()); // AxisEndpoint AxisEndpoint axisEndpoint = getAxisEndpoint(); if (axisEndpoint != null) { policyList.addAll(axisEndpoint.getPolicySubject().getAttachedPolicyComponents()); } AxisService service = null; if (axisEndpoint != null) { service = axisEndpoint.getAxisService(); } if (service != null) { PolicySubject servicePolicySubject = service.getPolicySubject(); if (servicePolicySubject != null) { policyList.addAll(servicePolicySubject.getAttachedPolicyComponents()); } } return PolicyUtil.getMergedPolicy(policyList, this); }
Iterator policyElements = PolicyUtil.getPolicyChildren(operation); Iterator policyRefElements = PolicyUtil.getPolicyRefChildren(operation);
if (policyElement instanceof Policy) { PolicyReference policyReference = PolicyUtil.createPolicyReference((Policy)policyElement); OMElement policyRefElement = PolicyUtil.getPolicyComponentAsOMElement(policyReference, serializer); PolicyUtil.getPolicyComponentAsOMElement((PolicyComponent)policyElement, serializer); OMElement firstChildElem = wsdlElement.getFirstElement();