Class PolicyModelMarshaller

  • Direct Known Subclasses:
    XmlPolicyModelMarshaller

    public abstract class PolicyModelMarshaller
    extends Object
    Abstract class defines interface for policy model marshaller implementations that are specific to underlying persistence layer.
    Author:
    Marek Potociar
    • Method Detail

      • marshal

        public abstract void marshal​(PolicySourceModel model,
                                     Object storage)
                              throws PolicyException
        Marshalls the policy source model using provided storage reference
        Parameters:
        model - policy source model to be marshalled
        storage - reference to underlying storage that should be used for model marshalling
        Throws:
        PolicyException - If marshalling failed
      • marshal

        public abstract void marshal​(Collection<PolicySourceModel> models,
                                     Object storage)
                              throws PolicyException
        Marshalls the collection of policy source models using provided storage reference
        Parameters:
        models - collection of policy source models to be marshalled
        storage - reference to underlying storage that should be used for model marshalling
        Throws:
        PolicyException - If marshalling failed
      • getXmlMarshaller

        public static PolicyModelMarshaller getXmlMarshaller​(boolean marshallInvisible)
        Factory methods that returns a marshaller instance based on input parameter.
        Parameters:
        marshallInvisible - boolean parameter indicating whether the marshaller returned by this method does marshall private assertions or not.
        Returns:
        policy model marshaller that either marshalls private assertions or not based on the input argument.