Class RMPolicyUtilities


  • public final class RMPolicyUtilities
    extends Object
    Utilities for working with policies and configurations.
    • Method Detail

      • getRMConfiguration

        public static RMConfiguration getRMConfiguration​(RMConfiguration defaultValue,
                                                         org.apache.cxf.message.Message message)
        Returns an RMAssertion that is compatible with the default value and all RMAssertions pertaining to the message (can never be null).
        Parameters:
        defaultValue - the default value (non-null)
        message - the message
        Returns:
        the compatible RMAssertion
      • collectRMAssertions

        public static Collection<org.apache.cxf.ws.policy.AssertionInfo> collectRMAssertions​(org.apache.cxf.ws.policy.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
      • 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