java.lang.Object
com.sun.xml.ws.policy.PolicyMap
A PolicyMap holds all policies for a scope.
This map is modeled around WSDL 1.1 policy scopes according to WS-PolicyAttachment. The map holds an information about
every scope for service, endpoint, operation, and input/output/fault message. It also provide accessibility methods for
computing and obtaining effective policy on each scope.
TODO: rename createWsdlMessageScopeKey to createWsdlInputOutputMessageScopeKey
- Author:
- Fabian Ritzmann
-
Method Summary
Modifier and TypeMethodDescriptionstatic PolicyMap
createPolicyMap
(Collection<? extends PolicyMapMutator> mutators) Creates new policy map instance and connects provided collection of policy map mutators to the created policy map.static PolicyMapKey
createWsdlEndpointScopeKey
(QName service, QName port) Creates an endpoint policy scope locator object, that serves as a access key into aPolicyMap
where actual endpoint policy scope for given endpoint can be retrieved.static PolicyMapKey
createWsdlFaultMessageScopeKey
(QName service, QName port, QName operation, QName fault) Creates a fault message policy scope locator object identified by a bound operation, that serves as a access key intoPolicyMap
where the actual fault message policy scope for one of the faults of a bound operation can be retrieved.static PolicyMapKey
createWsdlMessageScopeKey
(QName service, QName port, QName operation) Creates an input/output message policy scope locator object identified by a bound operation, that serves as a access key intoPolicyMap
where actual input/output message policy scope for given input message of a bound operation can be retrieved.static PolicyMapKey
createWsdlOperationScopeKey
(QName service, QName port, QName operation) Creates an operation policy scope locator object, that serves as a access key into aPolicyMap
where actual operation policy scope for given bound operation can be retrieved.static PolicyMapKey
createWsdlServiceScopeKey
(QName service) Creates a service policy scope locator object, that serves as a access key into aPolicyMap
where actual service policy scope for given service can be retrieved.Returns all endpoint scope keys stored in this policy mapReturns all fault message scope keys stored in this policy mapReturns all input message scope keys stored in this policy mapReturns all operation scope keys stored in this policy mapReturns all output message scope keys stored in this policy mapReturns all service scope keys stored in this policy mapReturns all policy subjects contained by this map.boolean
isEmpty()
Returns true if this map contains no key - policy pairs A null object key or policy constitutes a non-empty map.boolean
isFaultMessageSubject
(PolicySubject subject) boolean
isInputMessageSubject
(PolicySubject subject) boolean
isOutputMessageSubject
(PolicySubject subject) iterator()
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
createPolicyMap
Creates new policy map instance and connects provided collection of policy map mutators to the created policy map.- Parameters:
mutators
- collection of mutators that should be connected to the newly created map.- Returns:
- new policy map instance (mutable via provided collection of mutators).
-
getServiceEffectivePolicy
- Throws:
PolicyException
-
getEndpointEffectivePolicy
- Throws:
PolicyException
-
getOperationEffectivePolicy
- Throws:
PolicyException
-
getInputMessageEffectivePolicy
- Throws:
PolicyException
-
getOutputMessageEffectivePolicy
- Throws:
PolicyException
-
getFaultMessageEffectivePolicy
- Throws:
PolicyException
-
getAllServiceScopeKeys
Returns all service scope keys stored in this policy map- Returns:
- collection of service scope policy map keys stored in the map.
-
getAllEndpointScopeKeys
Returns all endpoint scope keys stored in this policy map- Returns:
- collection of endpoint scope policy map keys stored in the map.
-
getAllOperationScopeKeys
Returns all operation scope keys stored in this policy map- Returns:
- collection of operation scope policy map keys stored in the map.
-
getAllInputMessageScopeKeys
Returns all input message scope keys stored in this policy map- Returns:
- collection of input message scope policy map keys stored in the map.
-
getAllOutputMessageScopeKeys
Returns all output message scope keys stored in this policy map- Returns:
- collection of output message scope policy map keys stored in the map.
-
getAllFaultMessageScopeKeys
Returns all fault message scope keys stored in this policy map- Returns:
- collection of input message scope policy map keys stored in the map.
-
getPolicySubjects
Returns all policy subjects contained by this map.- Returns:
- All policy subjects contained by this map
-
isInputMessageSubject
-
isOutputMessageSubject
-
isFaultMessageSubject
-
isEmpty
public boolean isEmpty()Returns true if this map contains no key - policy pairs A null object key or policy constitutes a non-empty map.- Returns:
- true if this map contains no key - policy pairs
-
createWsdlServiceScopeKey
Creates a service policy scope locator object, that serves as a access key into aPolicyMap
where actual service policy scope for given service can be retrieved.- Parameters:
service
- qualified name of the service. Must not benull
.- Throws:
IllegalArgumentException
- in case service, port or operation parameter isnull
.
-
createWsdlEndpointScopeKey
public static PolicyMapKey createWsdlEndpointScopeKey(QName service, QName port) throws IllegalArgumentException Creates an endpoint policy scope locator object, that serves as a access key into aPolicyMap
where actual endpoint policy scope for given endpoint can be retrieved.- Parameters:
service
- qualified name of the service. Must not benull
.port
- qualified name of the endpoint. Must not benull
.- Throws:
IllegalArgumentException
- in case service, port or operation parameter isnull
.
-
createWsdlOperationScopeKey
public static PolicyMapKey createWsdlOperationScopeKey(QName service, QName port, QName operation) throws IllegalArgumentException Creates an operation policy scope locator object, that serves as a access key into aPolicyMap
where actual operation policy scope for given bound operation can be retrieved.- Parameters:
service
- qualified name of the service. Must not benull
.port
- qualified name of the endpoint. Must not benull
.operation
- qualified name of the operation. Must not benull
.- Throws:
IllegalArgumentException
- in case service, port or operation parameter isnull
.
-
createWsdlMessageScopeKey
public static PolicyMapKey createWsdlMessageScopeKey(QName service, QName port, QName operation) throws IllegalArgumentException Creates an input/output message policy scope locator object identified by a bound operation, that serves as a access key intoPolicyMap
where actual input/output message policy scope for given input message of a bound operation can be retrieved.
The method returns a key that is compliant with WSDL 1.1 Basic Profile Specification, according to which there should be no two operations with the same name in a single port type definition.- Parameters:
service
- qualified name of the service. Must not benull
.port
- qualified name of the endpoint. Must not benull
.operation
- qualified name of the operation. Must not benull
.- Throws:
IllegalArgumentException
- in case service, port or operation parameter isnull
.
-
createWsdlFaultMessageScopeKey
public static PolicyMapKey createWsdlFaultMessageScopeKey(QName service, QName port, QName operation, QName fault) throws IllegalArgumentException Creates a fault message policy scope locator object identified by a bound operation, that serves as a access key intoPolicyMap
where the actual fault message policy scope for one of the faults of a bound operation can be retrieved.
The method returns a key that is compliant with the WSDL 1.1 Basic Profile Specification, according to which there should be no two operations with the same name in a single port type definition.- Parameters:
service
- qualified name of the service. Must not benull
.port
- qualified name of the endpoint. Must not benull
.operation
- qualified name of the operation. Must not benull
.fault
- qualified name of the fault. Do not confuse this with the name of the actual message. This parameter takes the wsdl:binding/wsdl:operation/wsdl:fault name and not the wsdl:message name. Must not benull
.- Throws:
IllegalArgumentException
- in case service, port or operation parameter isnull
.
-
toString
-
iterator
-