Methods Summary |
---|
private void | addSubjects(java.util.Collection subjects, com.sun.xml.ws.policy.PolicyMap$ScopeMap scopeMap)Add all subjects in the given map to the collection
for (PolicyScope scope : scopeMap.getStoredScopes()) {
final Collection<PolicySubject> scopedSubjects = scope.getPolicySubjects();
subjects.addAll(scopedSubjects);
}
|
private static PolicyMapKey | createOperationOrInputOutputMessageKey(javax.xml.namespace.QName service, javax.xml.namespace.QName port, javax.xml.namespace.QName operation)
if (service == null || port == null || operation == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL(service, port, operation)));
}
return new PolicyMapKey(service, port, operation);
|
public static com.sun.xml.ws.policy.PolicyMap | createPolicyMap(java.util.Collection mutators)Creates new policy map instance and connects provided collection of policy map mutators to the created policy map.
final PolicyMap result = new PolicyMap();
if (mutators != null && !mutators.isEmpty()) {
for (PolicyMapMutator mutator : mutators) {
mutator.connect(result);
}
}
return result;
|
public static PolicyMapKey | createWsdlEndpointScopeKey(javax.xml.namespace.QName service, javax.xml.namespace.QName port)Creates an endpoint policy scope locator object, that serves as a access key into
a {@code PolicyMap} where actual endpoint policy scope for given endpoint can be retrieved.
if (service == null || port == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL(service, port)));
}
return new PolicyMapKey(service, port, null);
|
public static PolicyMapKey | createWsdlFaultMessageScopeKey(javax.xml.namespace.QName service, javax.xml.namespace.QName port, javax.xml.namespace.QName operation, javax.xml.namespace.QName faultMessage)Creates an fault message policy scope locator object identified by a bound operation, that serves as a
access key into {@code PolicyMap} where actual fault 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.
if (service == null || port == null || operation == null || faultMessage == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL(service, port, operation, faultMessage)));
}
return new PolicyMapKey(service, port, operation, faultMessage);
|
public static PolicyMapKey | createWsdlMessageScopeKey(javax.xml.namespace.QName service, javax.xml.namespace.QName port, javax.xml.namespace.QName operation)Creates an input/output message policy scope locator object identified by a bound operation, that serves as a
access key into {@code PolicyMap} 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.
return createOperationOrInputOutputMessageKey(service, port, operation);
|
public static PolicyMapKey | createWsdlOperationScopeKey(javax.xml.namespace.QName service, javax.xml.namespace.QName port, javax.xml.namespace.QName operation)Creates an operation policy scope locator object, that serves as a access key into
a {@code PolicyMap} where actual operation policy scope for given bound operation can be retrieved.
return createOperationOrInputOutputMessageKey(service, port, operation);
|
public static PolicyMapKey | createWsdlServiceScopeKey(javax.xml.namespace.QName service)Creates a service policy scope locator object, that serves as a access key into
a {@code PolicyMap} where actual service policy scope for given service can be retrieved.
if (service == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL()));
}
return new PolicyMapKey(service, null, null);
|
public java.util.Collection | getAllEndpointScopeKeys()Returns all endpoint scope keys stored in this policy map
return endpointMap.getAllKeys();
|
public java.util.Collection | getAllFaultMessageScopeKeys()Returns all fault message scope keys stored in this policy map
return faultMessageMap.getAllKeys();
|
public java.util.Collection | getAllInputMessageScopeKeys()Returns all input message scope keys stored in this policy map
return inputMessageMap.getAllKeys();
|
public java.util.Collection | getAllOperationScopeKeys()Returns all operation scope keys stored in this policy map
return operationMap.getAllKeys();
|
public java.util.Collection | getAllOutputMessageScopeKeys()Returns all output message scope keys stored in this policy map
return outputMessageMap.getAllKeys();
|
public java.util.Collection | getAllServiceScopeKeys()Returns all service scope keys stored in this policy map
return serviceMap.getAllKeys();
|
public Policy | getEndpointEffectivePolicy(PolicyMapKey key, java.util.Collection namespaces)
return endpointMap.getEffectivePolicy(key, namespaces);
|
public Policy | getEndpointEffectivePolicy(PolicyMapKey key)
return endpointMap.getEffectivePolicy(key);
|
public Policy | getFaultMessageEffectivePolicy(PolicyMapKey key, java.util.Collection namespaces)
return faultMessageMap.getEffectivePolicy(key, namespaces);
|
public Policy | getFaultMessageEffectivePolicy(PolicyMapKey key)
return faultMessageMap.getEffectivePolicy(key);
|
public Policy | getInputMessageEffectivePolicy(PolicyMapKey key, java.util.Collection namespaces)
return inputMessageMap.getEffectivePolicy(key, namespaces);
|
public Policy | getInputMessageEffectivePolicy(PolicyMapKey key)
return inputMessageMap.getEffectivePolicy(key);
|
public Policy | getOperationEffectivePolicy(PolicyMapKey key, java.util.Collection namespaces)
return operationMap.getEffectivePolicy(key, namespaces);
|
public Policy | getOperationEffectivePolicy(PolicyMapKey key)
return operationMap.getEffectivePolicy(key);
|
public Policy | getOutputMessageEffectivePolicy(PolicyMapKey key, java.util.Collection namespaces)
return outputMessageMap.getEffectivePolicy(key, namespaces);
|
public Policy | getOutputMessageEffectivePolicy(PolicyMapKey key)
return outputMessageMap.getEffectivePolicy(key);
|
public java.util.Collection | getPolicySubjects()Returns all policy subjects contained by this map.
final List<PolicySubject> subjects = new LinkedList<PolicySubject>();
addSubjects(subjects, serviceMap);
addSubjects(subjects, endpointMap);
addSubjects(subjects, operationMap);
addSubjects(subjects, inputMessageMap);
addSubjects(subjects, outputMessageMap);
addSubjects(subjects, faultMessageMap);
return subjects;
|
public Policy | getServiceEffectivePolicy(PolicyMapKey key)
return serviceMap.getEffectivePolicy(key);
|
public Policy | getServiceEffectivePolicy(PolicyMapKey key, java.util.Collection namespaces)
return serviceMap.getEffectivePolicy(key, namespaces);
|
public boolean | isEmpty()Returns true if this map contains no key - policy pairs
A null object key or policy constitutes a non-empty map.
return serviceMap.isEmpty() && endpointMap.isEmpty() &&
operationMap.isEmpty() && inputMessageMap.isEmpty() &&
outputMessageMap.isEmpty() && faultMessageMap.isEmpty();
|
public boolean | isFaultMessageSubject(PolicySubject subject)
for (PolicyScope scope : faultMessageMap.getStoredScopes()) {
if (scope.getPolicySubjects().contains(subject)) {
return true;
}
}
return false;
|
public boolean | isInputMessageSubject(PolicySubject subject)
for (PolicyScope scope : inputMessageMap.getStoredScopes()) {
if (scope.getPolicySubjects().contains(subject)) {
return true;
}
}
return false;
|
public boolean | isOutputMessageSubject(PolicySubject subject)
for (PolicyScope scope : outputMessageMap.getStoredScopes()) {
if (scope.getPolicySubjects().contains(subject)) {
return true;
}
}
return false;
|
public java.util.Iterator | iterator()
return new Iterator<Policy> () {
private final Iterator<Iterator<Policy>> mainIterator;
private Iterator<Policy> currentScopeIterator;
{ // instance initialization
final Collection<Iterator<Policy>> scopeIterators = new ArrayList<Iterator<Policy>>(6);
scopeIterators.add(serviceMap.iterator());
scopeIterators.add(endpointMap.iterator());
scopeIterators.add(operationMap.iterator());
scopeIterators.add(inputMessageMap.iterator());
scopeIterators.add(outputMessageMap.iterator());
scopeIterators.add(faultMessageMap.iterator());
mainIterator = scopeIterators.iterator();
currentScopeIterator = mainIterator.next();
}
public boolean hasNext() {
while (!currentScopeIterator.hasNext()) {
if (mainIterator.hasNext()) {
currentScopeIterator = mainIterator.next();
} else {
return false;
}
}
return true;
}
public Policy next() {
if (hasNext()) {
return currentScopeIterator.next();
}
throw LOGGER.logSevereException(new NoSuchElementException(LocalizationMessages.WSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP()));
}
public void remove() {
throw LOGGER.logSevereException(new UnsupportedOperationException(LocalizationMessages.WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED()));
}
};
|
void | putSubject(com.sun.xml.ws.policy.PolicyMap$ScopeType scopeType, PolicyMapKey key, PolicySubject subject)Places new subject into policy map under the scope identified by it's type and policy map key.
switch (scopeType) {
case SERVICE:
serviceMap.putSubject(key, subject);
break;
case ENDPOINT:
endpointMap.putSubject(key, subject);
break;
case OPERATION:
operationMap.putSubject(key, subject);
break;
case INPUT_MESSAGE:
inputMessageMap.putSubject(key, subject);
break;
case OUTPUT_MESSAGE:
outputMessageMap.putSubject(key, subject);
break;
case FAULT_MESSAGE:
faultMessageMap.putSubject(key, subject);
break;
default:
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0002_UNRECOGNIZED_SCOPE_TYPE(scopeType)));
}
|
void | setNewEffectivePolicyForScope(com.sun.xml.ws.policy.PolicyMap$ScopeType scopeType, PolicyMapKey key, Policy newEffectivePolicy)Replaces current effective policy on given scope (identified by a {@code key} parameter) with the new efective
policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply
stored with the key.
if (scopeType == null || key == null || newEffectivePolicy == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL()));
}
switch (scopeType) {
case SERVICE :
serviceMap.setNewEffectivePolicy(key, newEffectivePolicy);
break;
case ENDPOINT :
endpointMap.setNewEffectivePolicy(key, newEffectivePolicy);
break;
case OPERATION :
operationMap.setNewEffectivePolicy(key, newEffectivePolicy);
break;
case INPUT_MESSAGE :
inputMessageMap.setNewEffectivePolicy(key, newEffectivePolicy);
break;
case OUTPUT_MESSAGE :
outputMessageMap.setNewEffectivePolicy(key, newEffectivePolicy);
break;
case FAULT_MESSAGE :
faultMessageMap.setNewEffectivePolicy(key, newEffectivePolicy);
break;
default:
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0002_UNRECOGNIZED_SCOPE_TYPE(scopeType)));
}
|
public java.lang.String | toString()
// TODO
final StringBuffer result = new StringBuffer();
if(null!=this.serviceMap) {
result.append("\nServiceMap=").append(this.serviceMap);
}
if(null!=this.endpointMap) {
result.append("\nEndpointMap=").append(this.endpointMap);
}
if(null!=this.operationMap) {
result.append("\nOperationMap=").append(this.operationMap);
}
if(null!=this.inputMessageMap) {
result.append("\nInputMessageMap=").append(this.inputMessageMap);
}
if(null!=this.outputMessageMap) {
result.append("\nOutputMessageMap=").append(this.outputMessageMap);
}
if(null!=this.faultMessageMap) {
result.append("\nFaultMessageMap=").append(this.faultMessageMap);
}
return result.toString();
|