com.sun.xml.ws.policy.sourcemodel
Class PolicyModelTranslator
java.lang.Object
com.sun.xml.ws.policy.sourcemodel.PolicyModelTranslator
- Direct Known Subclasses:
- ModelTranslator
public class PolicyModelTranslator
- extends Object
This class provides a method for translating a PolicySourceModel structure to a normalized Policy expression.
The resulting Policy is disconnected from its model, thus any additional changes in the model will have no effect on the Policy
expression.
- Author:
- Marek Potociar, Fabian Ritzmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolicyModelTranslator
protected PolicyModelTranslator(Collection<PolicyAssertionCreator> creators)
throws PolicyException
- Throws:
PolicyException
getTranslator
public static PolicyModelTranslator getTranslator()
throws PolicyException
- Method returns thread-safe policy model translator instance.
This method is only intended to be used by code that has no dependencies on
JAX-WS. Otherwise use com.sun.xml.ws.policy.api.ModelTranslator.
- Returns:
- A policy model translator instance.
- Throws:
PolicyException - If instantiating a PolicyAssertionCreator failed.
translate
public Policy translate(PolicySourceModel model)
throws PolicyException
- The method translates
PolicySourceModel structure into normalized Policy expression. The resulting Policy
is disconnected from its model, thus any additional changes in model will have no effect on the Policy expression.
- Parameters:
model - the model to be translated into normalized policy expression. Must not be null.
- Returns:
- translated policy expression in it's normalized form.
- Throws:
PolicyException - in case of translation failure
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.