本文整理汇总了Java中com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages类的典型用法代码示例。如果您正苦于以下问题:Java LocalizationMessages类的具体用法?Java LocalizationMessages怎么用?Java LocalizationMessages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LocalizationMessages类属于com.sun.xml.internal.ws.policy.privateutil包,在下文中一共展示了LocalizationMessages类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: iterator
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
public Iterator<Policy> iterator() {
return new Iterator<Policy> () {
private final Iterator<PolicyMapKey> keysIterator = internalMap.keySet().iterator();
public boolean hasNext() {
return keysIterator.hasNext();
}
public Policy next() {
final PolicyMapKey key = keysIterator.next();
try {
return getEffectivePolicy(key);
} catch (PolicyException e) {
throw LOGGER.logSevereException(new IllegalStateException(LocalizationMessages.WSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY(key), e));
}
}
public void remove() {
throw LOGGER.logSevereException(new UnsupportedOperationException(LocalizationMessages.WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED()));
}
};
}
示例2: putSubject
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
/**
* Places new subject into policy map under the scope identified by it's type and policy map key.
*
* @param scopeType the type of the scope the subject belongs to
* @param key a policy map key to be used to store the subject
* @param subject actual policy subject to be stored in the policy map
*
* @throw IllegalArgumentException in case the scope type is not recognized.
*/
void putSubject(final ScopeType scopeType, final PolicyMapKey key, final PolicySubject subject) {
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)));
}
}
示例3: PolicyReferenceData
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
public PolicyReferenceData(URI referencedModelUri, String expectedDigest, URI usedDigestAlgorithm) {
if (CLASS_INITIALIZATION_EXCEPTION != null) {
throw LOGGER.logSevereException(new IllegalStateException(LocalizationMessages.WSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD(), CLASS_INITIALIZATION_EXCEPTION));
}
if (usedDigestAlgorithm != null && expectedDigest == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED()));
}
this.referencedModelUri = referencedModelUri;
if (expectedDigest == null) {
this.digest = null;
this.digestAlgorithmUri = null;
} else {
this.digest = expectedDigest;
if (usedDigestAlgorithm == null) {
this.digestAlgorithmUri = DEFAULT_DIGEST_ALGORITHM_URI;
} else {
this.digestAlgorithmUri = usedDigestAlgorithm;
}
}
}
示例4: processCharacters
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
private StringBuilder processCharacters(final ModelNode.Type currentNodeType, final Characters characters,
final StringBuilder currentValueBuffer)
throws PolicyException {
if (characters.isWhiteSpace()) {
return currentValueBuffer;
} else {
final StringBuilder buffer = (currentValueBuffer == null) ? new StringBuilder() : currentValueBuffer;
final String data = characters.getData();
if (currentNodeType == ModelNode.Type.ASSERTION || currentNodeType == ModelNode.Type.ASSERTION_PARAMETER_NODE) {
return buffer.append(data);
} else {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE(currentNodeType, data)));
}
}
}
示例5: processCharacters
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
private void processCharacters(final Characters chars, final StartElement currentElement, final Map<URI, Policy> map)
throws PolicyException {
if (chars.isWhiteSpace()) {
return;
}
else {
final String data = chars.getData();
if ((currentElement != null) && URI.equals(currentElement.getName())) {
processUri(chars, map);
return;
} else {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0092_CHARACTER_DATA_UNEXPECTED(currentElement, data, chars.getLocation())));
}
}
}
示例6: createXMLEventReader
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
/**
* Method checks if the storage type is supported and transforms it to XMLEventReader instance which is then returned.
* Throws PolicyException if the transformation is not succesfull or if the storage type is not supported.
*
* @param storage An XMLEventReader instance.
* @return The storage cast to an XMLEventReader.
* @throws PolicyException If the XMLEventReader cast failed.
*/
private XMLEventReader createXMLEventReader(final Object storage)
throws PolicyException {
if (storage instanceof XMLEventReader) {
return (XMLEventReader) storage;
}
else if (!(storage instanceof Reader)) {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0022_STORAGE_TYPE_NOT_SUPPORTED(storage.getClass().getName())));
}
try {
return XMLInputFactory.newInstance().createXMLEventReader((Reader) storage);
} catch (XMLStreamException e) {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE(), e));
}
}
示例7: initializeNewModel
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
private PolicySourceModel initializeNewModel(final StartElement element) throws PolicyException, XMLStreamException {
PolicySourceModel model;
final NamespaceVersion nsVersion = NamespaceVersion.resolveVersion(element.getName().getNamespaceURI());
final Attribute policyName = getAttributeByName(element, nsVersion.asQName(XmlToken.Name));
final Attribute xmlId = getAttributeByName(element, PolicyConstants.XML_ID);
Attribute policyId = getAttributeByName(element, PolicyConstants.WSU_ID);
if (policyId == null) {
policyId = xmlId;
} else if (xmlId != null) {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED()));
}
model = createSourceModel(nsVersion,
(policyId == null) ? null : policyId.getValue(),
(policyName == null) ? null : policyName.getValue());
return model;
}
示例8: createBindingMessageSubject
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
public static WsdlBindingSubject createBindingMessageSubject(QName bindingName, QName operationName, QName messageName, WsdlMessageType messageType) {
if (messageType == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0083_MESSAGE_TYPE_NULL()));
}
if (messageType == WsdlMessageType.NO_MESSAGE) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0084_MESSAGE_TYPE_NO_MESSAGE()));
}
if ((messageType == WsdlMessageType.FAULT) && (messageName == null)) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0085_MESSAGE_FAULT_NO_NAME()));
}
final WsdlBindingSubject operationSubject = createBindingOperationSubject(bindingName, operationName);
return new WsdlBindingSubject(messageName, messageType, WsdlNameScope.MESSAGE, operationSubject);
}
示例9: PolicyMapKey
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
PolicyMapKey(final QName service, final QName port, final QName operation, final QName faultMessage, final PolicyMapKeyHandler handler) {
if (handler == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET()));
}
this.service = service;
this.port = port;
this.operation = operation;
this.faultMessage = faultMessage;
this.handler = handler;
}
示例10: setHandler
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
void setHandler(PolicyMapKeyHandler handler) {
if (handler == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET()));
}
this.handler = handler;
}
示例11: connect
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
/**
* The method is used to connect the policy map mutator instance to the map it should mutate.
*
* @param map the policy map instance that will be mutable by this mutator.
* @throws IllegalStateException in case this mutator object is already connected to a policy map.
*/
public void connect(final PolicyMap map) {
if (isConnected()) {
throw LOGGER.logSevereException(new IllegalStateException(LocalizationMessages.WSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED()));
}
this.map = map;
}
示例12: createLocalCopy
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
private PolicyMapKey createLocalCopy(final PolicyMapKey key) {
if (key == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL()));
}
final PolicyMapKey localKeyCopy = new PolicyMapKey(key);
localKeyCopy.setHandler(scopeKeyHandler);
return localKeyCopy;
}
示例13: setNewEffectivePolicyForScope
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
/**
* 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.
*
* @param scopeType the type of the scope the subject belongs to. Must not be {@code null}.
* @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}.
* @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}.
*
* @throw IllegalArgumentException in case any of the input parameters is {@code null}
* or in case the scope type is not recognized.
*/
void setNewEffectivePolicyForScope(final ScopeType scopeType, final PolicyMapKey key, final Policy newEffectivePolicy) throws IllegalArgumentException {
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)));
}
}
示例14: createOperationOrInputOutputMessageKey
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
private static PolicyMapKey createOperationOrInputOutputMessageKey(final QName service, final QName port, final 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, operationAndInputOutputMessageKeyHandler);
}
示例15: PolicySubject
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
/**
* Constructs a policy subject instance.
*
* @param subject object to which the policies are attached. Must not be {@code null}.
* @param policy first policy attached to the subject. Must not be {@code null}.
*
* @throws IllegalArgumentException in case any of the arguments is {@code null}.
*/
public PolicySubject(Object subject, Policy policy) throws IllegalArgumentException {
if (subject == null || policy == null) {
throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL(subject, policy)));
}
this.subject = subject;
this.attach(policy);
}