Class 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
    • 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