Package com.sun.xml.ws.policy
Class PolicyMerger
- java.lang.Object
-
- 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PolicyMergergetMerger()Factory method for obtaining thread-safe policy merger instance.Policymerge(Collection<Policy> policies)Takes collection of policies and merges them into a single policy using algorithm described in WS-PolicyAttachment specification.
-
-
-
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
nullor empty, returnsnull. If provided collection of policies contains only single policy, the policy is returned.
-
-