Apache CXF API

org.apache.cxf.ws.rm.policy
Class RMPolicyUtilities

java.lang.Object
  extended by org.apache.cxf.ws.rm.policy.RMPolicyUtilities

public final class RMPolicyUtilities
extends Object

Utilities for working with policies and configurations.


Method Summary
static Collection<AssertionInfo> collectRMAssertions(AssertionInfoMap aim)
          Collect RMAssertions from map.
static boolean equals(RMAssertion a, RMAssertion b)
           
static boolean equals(RMConfiguration a, RMConfiguration b)
           
static RMConfiguration getRMConfiguration(RMConfiguration defaultValue, Message message)
          Returns an RMAssertion that is compatible with the default value and all RMAssertions pertaining to the message (can never be null).
static RMConfiguration intersect(org.apache.neethi.builders.PrimitiveAssertion rma, RMConfiguration cfg)
          Intersect a policy with a supplied configuration.
static RMConfiguration intersect(RMAssertion rma, RMConfiguration cfg)
          Intersect a policy with a supplied configuration.
static boolean isCompatible(org.apache.neethi.builders.PrimitiveAssertion rma, RMConfiguration cfg)
          Check if a policy is compatible with a supplied configuration.
static boolean isCompatible(RMAssertion asser, RMConfiguration cfg)
          Check if a policy is compatible with a supplied configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRMConfiguration

public static RMConfiguration getRMConfiguration(RMConfiguration defaultValue,
                                                 Message message)
Returns an RMAssertion that is compatible with the default value and all RMAssertions pertaining to the message (can never be null).

Parameters:
rma - the default value (non-null)
message - the message
Returns:
the compatible RMAssertion

collectRMAssertions

public static Collection<AssertionInfo> collectRMAssertions(AssertionInfoMap aim)
Collect RMAssertions from map. This checks both namespaces defined for WS-RM policy assertions, along with the WS-I RSP namespace.

Parameters:
aim - map, may be null
Returns:
merged collection, never null

equals

public static boolean equals(RMAssertion a,
                             RMAssertion b)

equals

public static boolean equals(RMConfiguration a,
                             RMConfiguration b)

intersect

public static RMConfiguration intersect(RMAssertion rma,
                                        RMConfiguration cfg)
Intersect a policy with a supplied configuration.

Parameters:
rma -
cfg -
Returns:
result configuration

isCompatible

public static boolean isCompatible(RMAssertion asser,
                                   RMConfiguration cfg)
Check if a policy is compatible with a supplied configuration.

Parameters:
asser -
cfg -
Returns:
true if compatible, false if not

intersect

public static RMConfiguration intersect(org.apache.neethi.builders.PrimitiveAssertion rma,
                                        RMConfiguration cfg)
Intersect a policy with a supplied configuration.

Parameters:
rma -
cfg -
Returns:
result configuration

isCompatible

public static boolean isCompatible(org.apache.neethi.builders.PrimitiveAssertion rma,
                                   RMConfiguration cfg)
Check if a policy is compatible with a supplied configuration.

Parameters:
rma -
cfg -
Returns:
true if compatible, false if not

Apache CXF API

Apache CXF