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 aPolicySourceModelstructure to a normalizedPolicyexpression. 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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPolicyModelTranslator(Collection<PolicyAssertionCreator> creators)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PolicyModelTranslatorgetTranslator()Method returns thread-safe policy model translator instance.Policytranslate(PolicySourceModel model)The method translatesPolicySourceModelstructure into normalizedPolicyexpression.
-
-
-
Constructor Detail
-
PolicyModelTranslator
protected PolicyModelTranslator(Collection<PolicyAssertionCreator> creators) throws PolicyException
- Throws:
PolicyException
-
-
Method Detail
-
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 translatesPolicySourceModelstructure into normalizedPolicyexpression. 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 benull.- Returns:
- translated policy expression in it's normalized form.
- Throws:
PolicyException- in case of translation failure
-
-