Class ContextFactory

java.lang.Object
com.sun.identity.xacml.context.ContextFactory

@SupportedAll public class ContextFactory 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 Details

    • getInstance

      public static ContextFactory getInstance()
      Returns the instance of ContextSchemaFactory.
      Returns:
      ContextSchemaFactory.
    • createRequest

      public Request createRequest()
      Returns a new instance of Request.
      Returns:
      a new instance of Request
    • createRequest

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

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

      public Resource createResource()
      Returns a new instance of Resource.
      Returns:
      a new instance of Resource
    • createResource

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

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

      public Subject createSubject()
      Returns a new instance of Subject.
      Returns:
      a new instance of Subject
    • createSubject

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

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

      public Action createAction()
      Returns a new instance of Action.
      Returns:
      a new instance of Action
    • createAction

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

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

      public Environment createEnvironment()
      Returns a new instance of Environment.
      Returns:
      a new instance of Environment
    • createEnvironment

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

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

      public Attribute createAttribute()
      Returns a new instance of Attribute. Caller may need to call setters of the class to populate the object.
      Returns:
      a new instance of Attribute.
    • createAttribute

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

      public Attribute createAttribute(String xml) throws XACMLException
      Returns a new instance of Attribute. The return object is immutable.
      Parameters:
      xml - an XML String representing Attribute.
      Returns:
      a new instance of Attribute.
      Throws:
      XACMLException - if error occurs while processing the XML string.
    • createXACMLAuthzDecisionQuery

      public XACMLAuthzDecisionQuery createXACMLAuthzDecisionQuery()
      Returns a new instance of XACMLAuthzDecisionQuery. Caller may need to call setters of the class to populate the object.
      Returns:
      a new instance of XACMLAuthzDecisionQuery.
    • createXACMLAuthzDecisionQuery

      public XACMLAuthzDecisionQuery createXACMLAuthzDecisionQuery(Element elem) throws XACMLException, com.sun.identity.saml2.common.SAML2Exception
      Returns a new instance of XACMLAuthzDecisionQuery. The return object is immutable.
      Parameters:
      elem - an Element representation of XACMLAuthzDecisionQuery.
      Returns:
      a new instance of XACMLAuthzDecisionQuery.
      Throws:
      XACMLException - if error occurs while processing the Element.
      com.sun.identity.saml2.common.SAML2Exception - if not able to create the base saml RequestAbstract
    • createXACMLAuthzDecisionQuery

      public XACMLAuthzDecisionQuery createXACMLAuthzDecisionQuery(String xml) throws XACMLException, com.sun.identity.saml2.common.SAML2Exception
      Returns a new instance of XACMLAuthzDecisionQuery. The return object is immutable.
      Parameters:
      xml - an XML String representing XACMLAuthzDecisionQuery.
      Returns:
      a new instance of XACMLAuthzDecisionQuery.
      Throws:
      XACMLException - if error occurs while processing the XML string.
      com.sun.identity.saml2.common.SAML2Exception - if not able to create the base saml RequestAbstract
    • createXACMLAuthzDecisionStatement

      public XACMLAuthzDecisionStatement createXACMLAuthzDecisionStatement()
      Returns a new instance of XACMLAuthzDecisionStatement. Caller may need to call setters of the class to populate the object.
      Returns:
      a new instance of XACMLAuthzDecisionStatement.
    • createXACMLAuthzDecisionStatement

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

      public XACMLAuthzDecisionStatement createXACMLAuthzDecisionStatement(String xml) throws XACMLException
      Returns a new instance of XACMLAuthzDecisionStatement. The return object is immutable.
      Parameters:
      xml - an XML String representing XACMLAuthzDecisionStatement.
      Returns:
      a new instance of XACMLAuthzDecisionStatement.
      Throws:
      XACMLException - if error occurs while processing the XML string.
    • createResponse

      public Response createResponse() throws XACMLException
      Returns a new instance of Response.
      Returns:
      a new instance of Response
      Throws:
      XACMLException
    • createResponse

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

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

      public Result createResult() throws XACMLException
      Returns a new instance of Result.
      Returns:
      a new instance of Result
      Throws:
      XACMLException
    • createResult

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

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

      public Decision createDecision() throws XACMLException
      Returns a new instance of Decision.
      Returns:
      a new instance of Decision
      Throws:
      XACMLException
    • createDecision

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

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

      public Status createStatus() throws XACMLException
      Returns a new instance of Status.
      Returns:
      a new instance of Status
      Throws:
      XACMLException
    • createStatus

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

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

      public StatusCode createStatusCode() throws XACMLException
      Returns a new instance of StatusCode.
      Returns:
      a new instance of StatusCode
      Throws:
      XACMLException
    • createStatusCode

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

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

      public StatusMessage createStatusMessage() throws XACMLException
      Returns a new instance of StatusMessage.
      Returns:
      a new instance of StatusMessage
      Throws:
      XACMLException
    • createStatusMessage

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

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

      public StatusDetail createStatusDetail() throws XACMLException
      Returns a new instance of StatusDetail.
      Returns:
      a new instance of StatusDetail
      Throws:
      XACMLException
    • createStatusDetail

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

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