com.sun.xml.ws.policy
Class PolicyMerger

java.lang.Object
  extended by com.sun.xml.ws.policy.PolicyMerger

public final class PolicyMerger
extends Object

Merge policies and return the effective policy. WS-PolicyAttachment defines a merge algorithm for WSDL 1.1 policy attachments.


Method Summary
static PolicyMerger getMerger()
          Factory method for obtaining thread-safe policy merger instance.
 Policy merge(Collection<Policy> policies)
          Takes collection of policies and merges them into a single policy using algorithm described in WS-PolicyAttachment specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMerger

public static PolicyMerger getMerger()
Factory method for obtaining thread-safe policy merger instance.

Returns:
policy merger instance.

merge

public Policy merge(Collection<Policy> policies)
Takes collection of policies and merges them into a single policy using algorithm described in WS-PolicyAttachment specification. None of the original policies in the collection are modified in any way. The newly created policy has an ID that is a concatentation of all merged policy IDs.

Parameters:
policies - collection of policies to be merged. The collection must not contain 'null' elements!
Returns:
merged policy containing combination of policy alternatives stored in all input policies. If provided collection of policies is null or empty, returns null. If provided collection of policies contains only single policy, the policy is returned.


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.