Class PolicyFactory


  • @SupportedAll
    public class PolicyFactory
    extends Object
    This is the factory class to obtain instances of the objects defined in xacml context schema. There are three ways to obtain an instance of a object type: with no parameters, with a DOM tree element, or with an XML String.
    • Method Detail

      • getInstance

        public static PolicyFactory getInstance()
        Returns the instance of ContextSchemaFactory.
        Returns:
        ContextSchemaFactory.
      • createObligation

        public Obligation createObligation()
        Returns a new instance of Obligation.
        Returns:
        a new instance of Obligation
      • createObligation

        public Obligation createObligation​(Element elem)
                                    throws XACMLException
        Returns a new instance of Obligation. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of Obligation
        Returns:
        a new instance of Obligation
        Throws:
        XACMLException - if error occurs while processing the DOM Element
      • createObligation

        public Obligation createObligation​(String xml)
                                    throws XACMLException
        Returns a new instance of Obligation The return object is immutable.
        Parameters:
        xml - a XML string representation of Obligation
        Returns:
        a new instance of Resource
        Throws:
        XACMLException - if error occurs while processing the XML string
      • createObligations

        public Obligations createObligations()
        Returns a new instance of Obligations.
        Returns:
        a new instance of Obligations
      • createObligations

        public Obligations createObligations​(Element elem)
                                      throws XACMLException
        Returns a new instance of Obligations. The return object is immutable.
        Parameters:
        elem - a DOM Element representation of Obligations
        Returns:
        a new instance of Obligations
        Throws:
        XACMLException - if error occurs while processing the DOM Element
      • createObligations

        public Obligations createObligations​(String xml)
                                      throws XACMLException
        Returns a new instance of Obligations The return object is immutable.
        Parameters:
        xml - a XML string representation of Obligations
        Returns:
        a new instance of Obligations
        Throws:
        XACMLException - if error occurs while processing the XML string