com.sun.xml.ws.policy.sourcemodel
Class PolicyModelTranslator

java.lang.Object
  extended by 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

Constructor Summary
protected PolicyModelTranslator(Collection<PolicyAssertionCreator> creators)
           
 
Method Summary
static PolicyModelTranslator getTranslator()
          Method returns thread-safe policy model translator instance.
 Policy translate(PolicySourceModel model)
          The method translates PolicySourceModel structure into normalized Policy expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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.