本文整理汇总了Java中com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages类的典型用法代码示例。如果您正苦于以下问题:Java LocalizationMessages类的具体用法?Java LocalizationMessages怎么用?Java LocalizationMessages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LocalizationMessages类属于com.sun.xml.internal.ws.policy.privateutil包,在下文中一共展示了LocalizationMessages类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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()));
}
};
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:PolicyMap.java
示例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)));
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:PolicyMap.java
示例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;
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:PolicyReferenceData.java
示例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)));
}
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:XmlPolicyModelUnmarshaller.java
示例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())));
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:ExternalAttachmentsUnmarshaller.java
示例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));
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:XmlPolicyModelUnmarshaller.java
示例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;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:XmlPolicyModelUnmarshaller.java
示例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);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:WsdlBindingSubject.java
示例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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:PolicyMapKey.java
示例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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:PolicyMapKey.java
示例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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:PolicyMapMutator.java
示例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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:PolicyMap.java
示例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)));
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:41,代码来源:PolicyMap.java
示例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);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:PolicyMap.java
示例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);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:PolicySubject.java
示例16: marshal
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
public void marshal(final PolicySourceModel model, final Object storage) throws PolicyException {
if (storage instanceof StaxSerializer) {
marshal(model, (StaxSerializer) storage);
} else if (storage instanceof TypedXmlWriter) {
marshal(model, (TypedXmlWriter) storage);
} else if (storage instanceof XMLStreamWriter) {
marshal(model, (XMLStreamWriter) storage);
} else {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0022_STORAGE_TYPE_NOT_SUPPORTED(storage.getClass().getName())));
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:XmlPolicyModelMarshaller.java
示例17: RawAlternative
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
RawAlternative(Collection<ModelNode> assertionNodes) throws PolicyException {
this.nestedAssertions = new LinkedList<RawAssertion>();
for (ModelNode node : assertionNodes) {
RawAssertion assertion = new RawAssertion(node, new LinkedList<ModelNode>());
nestedAssertions.add(assertion);
for (ModelNode assertionNodeChild : assertion.originalNode.getChildren()) {
switch (assertionNodeChild.getType()) {
case ASSERTION_PARAMETER_NODE:
assertion.parameters.add(assertionNodeChild);
break;
case POLICY:
case POLICY_REFERENCE:
if (assertion.nestedAlternatives == null) {
assertion.nestedAlternatives = new LinkedList<RawAlternative>();
RawPolicy nestedPolicy;
if (assertionNodeChild.getType() == ModelNode.Type.POLICY) {
nestedPolicy = new RawPolicy(assertionNodeChild, assertion.nestedAlternatives);
} else {
nestedPolicy = new RawPolicy(getReferencedModelRootNode(assertionNodeChild), assertion.nestedAlternatives);
}
this.allNestedPolicies.add(nestedPolicy);
} else {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES()));
}
break;
default:
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0008_UNEXPECTED_CHILD_MODEL_TYPE(assertionNodeChild.getType())));
}
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:PolicyModelTranslator.java
示例18: translate
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
/**
* The method translates {@link PolicySourceModel} structure into normalized {@link Policy} expression. The resulting Policy
* is disconnected from its model, thus any additional changes in model will have no effect on the Policy expression.
*
* @param model the model to be translated into normalized policy expression. Must not be {@code null}.
* @return translated policy expression in it's normalized form.
* @throws PolicyException in case of translation failure
*/
public Policy translate(final PolicySourceModel model) throws PolicyException {
LOGGER.entering(model);
if (model == null) {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL()));
}
PolicySourceModel localPolicyModelCopy;
try {
localPolicyModelCopy = model.clone();
} catch (CloneNotSupportedException e) {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL(), e));
}
final String policyId = localPolicyModelCopy.getPolicyId();
final String policyName = localPolicyModelCopy.getPolicyName();
final Collection<AssertionSet> alternatives = createPolicyAlternatives(localPolicyModelCopy);
LOGGER.finest(LocalizationMessages.WSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED(alternatives.size()));
Policy policy = null;
if (alternatives.size() == 0) {
policy = Policy.createNullPolicy(model.getNamespaceVersion(), policyName, policyId);
LOGGER.finest(LocalizationMessages.WSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED());
} else if (alternatives.size() == 1 && alternatives.iterator().next().isEmpty()) {
policy = Policy.createEmptyPolicy(model.getNamespaceVersion(), policyName, policyId);
LOGGER.finest(LocalizationMessages.WSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED());
} else {
policy = Policy.createPolicy(model.getNamespaceVersion(), policyName, policyId, alternatives);
LOGGER.finest(LocalizationMessages.WSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED(alternatives.size(), policy.getNumberOfAssertionSets()));
}
LOGGER.exiting(policy);
return policy;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:44,代码来源:PolicyModelTranslator.java
示例19: decompose
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
/**
* Decomposes the unprocessed alternative content into two different collections:
* <p/>
* Content of 'EXACTLY_ONE' child nodes is expanded and placed in one list and
* 'ASSERTION' nodes are placed into other list. Direct 'ALL' and 'POLICY' child nodes are 'dissolved' in the process.
*
* Method reuses precreated ContentDecomposition object, which is reset before reuse.
*/
private void decompose(final Collection<ModelNode> content, final ContentDecomposition decomposition) throws PolicyException {
decomposition.reset();
final Queue<ModelNode> allContentQueue = new LinkedList<ModelNode>(content);
ModelNode node;
while ((node = allContentQueue.poll()) != null) {
// dissolving direct 'POLICY', 'POLICY_REFERENCE' and 'ALL' child nodes
switch (node.getType()) {
case POLICY :
case ALL :
allContentQueue.addAll(node.getChildren());
break;
case POLICY_REFERENCE :
allContentQueue.addAll(getReferencedModelRootNode(node).getChildren());
break;
case EXACTLY_ONE :
decomposition.exactlyOneContents.add(expandsExactlyOneContent(node.getChildren()));
break;
case ASSERTION :
decomposition.assertions.add(node);
break;
default :
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND(node.getType())));
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:PolicyModelTranslator.java
示例20: getReferencedModelRootNode
import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages; //导入依赖的package包/类
private static ModelNode getReferencedModelRootNode(final ModelNode policyReferenceNode) throws PolicyException {
final PolicySourceModel referencedModel = policyReferenceNode.getReferencedModel();
if (referencedModel == null) {
final PolicyReferenceData refData = policyReferenceNode.getPolicyReferenceData();
if (refData == null) {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT()));
} else {
throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING(refData.getReferencedModelUri())));
}
} else {
return referencedModel.getRootNode();
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:PolicyModelTranslator.java
注:本文中的com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论