Package com.sun.identity.xacml.context
Class ContextFactory
- java.lang.Object
-
- com.sun.identity.xacml.context.ContextFactory
-
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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ActioncreateAction()Returns a new instance ofAction.ActioncreateAction(String xml)Returns a new instance ofAction.ActioncreateAction(Element elem)Returns a new instance ofAction.AttributecreateAttribute()Returns a new instance ofAttribute.AttributecreateAttribute(String xml)Returns a new instance ofAttribute.AttributecreateAttribute(Element elem)Returns a new instance ofAttribute.DecisioncreateDecision()Returns a new instance ofDecision.DecisioncreateDecision(String xml)Returns a new instance ofDecisionThe return object is immutable.DecisioncreateDecision(Element elem)Returns a new instance ofDecision.EnvironmentcreateEnvironment()Returns a new instance ofEnvironment.EnvironmentcreateEnvironment(String xml)Returns a new instance ofEnvironment.EnvironmentcreateEnvironment(Element elem)Returns a new instance ofEnvironment.RequestcreateRequest()Returns a new instance ofRequest.RequestcreateRequest(String xml)Returns a new instance ofRequestThe return object is immutable.RequestcreateRequest(Element elem)Returns a new instance ofRequest.ResourcecreateResource()Returns a new instance ofResource.ResourcecreateResource(String xml)Returns a new instance ofResourceThe return object is immutable.ResourcecreateResource(Element elem)Returns a new instance ofResource.ResponsecreateResponse()Returns a new instance ofResponse.ResponsecreateResponse(String xml)Returns a new instance ofResponseThe return object is immutable.ResponsecreateResponse(Element elem)Returns a new instance ofResponse.ResultcreateResult()Returns a new instance ofResult.ResultcreateResult(String xml)Returns a new instance ofResultThe return object is immutable.ResultcreateResult(Element elem)Returns a new instance ofResult.StatuscreateStatus()Returns a new instance ofStatus.StatuscreateStatus(String xml)Returns a new instance ofStatusThe return object is immutable.StatuscreateStatus(Element elem)Returns a new instance ofStatus.StatusCodecreateStatusCode()Returns a new instance ofStatusCode.StatusCodecreateStatusCode(String xml)Returns a new instance ofStatusCodeThe return object is immutable.StatusCodecreateStatusCode(Element elem)Returns a new instance ofStatusCode.StatusDetailcreateStatusDetail()Returns a new instance ofStatusDetail.StatusDetailcreateStatusDetail(String xml)Returns a new instance ofStatusDetailThe return object is immutable.StatusDetailcreateStatusDetail(Element elem)Returns a new instance ofStatusDetail.StatusMessagecreateStatusMessage()Returns a new instance ofStatusMessage.StatusMessagecreateStatusMessage(String xml)Returns a new instance ofStatusMessageThe return object is immutable.StatusMessagecreateStatusMessage(Element elem)Returns a new instance ofStatusMessage.SubjectcreateSubject()Returns a new instance ofSubject.SubjectcreateSubject(String xml)Returns a new instance ofSubject.SubjectcreateSubject(Element elem)Returns a new instance ofSubject.XACMLAuthzDecisionQuerycreateXACMLAuthzDecisionQuery()Returns a new instance ofXACMLAuthzDecisionQuery.XACMLAuthzDecisionQuerycreateXACMLAuthzDecisionQuery(String xml)Returns a new instance ofXACMLAuthzDecisionQuery.XACMLAuthzDecisionQuerycreateXACMLAuthzDecisionQuery(Element elem)Returns a new instance ofXACMLAuthzDecisionQuery.XACMLAuthzDecisionStatementcreateXACMLAuthzDecisionStatement()Returns a new instance ofXACMLAuthzDecisionStatement.XACMLAuthzDecisionStatementcreateXACMLAuthzDecisionStatement(String xml)Returns a new instance ofXACMLAuthzDecisionStatement.XACMLAuthzDecisionStatementcreateXACMLAuthzDecisionStatement(Element elem)Returns a new instance ofXACMLAuthzDecisionStatement.static ContextFactorygetInstance()Returns the instance ofContextSchemaFactory.
-
-
-
Method Detail
-
getInstance
public static ContextFactory getInstance()
Returns the instance ofContextSchemaFactory.- Returns:
ContextSchemaFactory.
-
createRequest
public Request createRequest()
Returns a new instance ofRequest.- Returns:
- a new instance of
Request
-
createRequest
public Request createRequest(Element elem) throws XACMLException
Returns a new instance ofRequest. The return object is immutable.- Parameters:
elem- a DOM Element representation ofRequest- 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 ofRequestThe return object is immutable.- Parameters:
xml- a XML string representation ofRequest- Returns:
- a new instance of
Resource - Throws:
XACMLException- if error occurs while processing the XML string
-
createResource
public Resource createResource()
Returns a new instance ofResource.- Returns:
- a new instance of
Resource
-
createResource
public Resource createResource(Element elem) throws XACMLException
Returns a new instance ofResource. The return object is immutable.- Parameters:
elem- a DOM Element representation ofResource- 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 ofResourceThe return object is immutable.- Parameters:
xml- a XML string representation ofResource- Returns:
- a new instance of
Resource - Throws:
XACMLException- if error occurs while processing the XML string
-
createSubject
public Subject createSubject()
Returns a new instance ofSubject.- Returns:
- a new instance of
Subject
-
createSubject
public Subject createSubject(Element elem) throws XACMLException
Returns a new instance ofSubject. The return object is immutable.- Parameters:
elem- a DOM Element representation ofSubject- 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 ofSubject. The return object is immutable.- Parameters:
xml- a XML string representation ofSubject- Returns:
- a new instance of
Subject - Throws:
XACMLException- if error occurs while processing the XML string
-
createAction
public Action createAction()
Returns a new instance ofAction.- Returns:
- a new instance of
Action
-
createAction
public Action createAction(Element elem) throws XACMLException
Returns a new instance ofAction. The return object is immutable.- Parameters:
elem- a DOM Element representation ofAction- 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 ofAction. The return object is immutable.- Parameters:
xml- a XML string representation ofAction- Returns:
- a new instance of
Action - Throws:
XACMLException- if error occurs while processing the XML string
-
createEnvironment
public Environment createEnvironment()
Returns a new instance ofEnvironment.- Returns:
- a new instance of
Environment
-
createEnvironment
public Environment createEnvironment(Element elem) throws XACMLException
Returns a new instance ofEnvironment. The return object is immutable.- Parameters:
elem- a DOM Element representation ofEnvironment- 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 ofEnvironment. The return object is immutable.- Parameters:
xml- a XML string representation ofEnvironment- Returns:
- a new instance of
Environment - Throws:
XACMLException- if error occurs while processing the XML string
-
createAttribute
public Attribute createAttribute()
Returns a new instance ofAttribute. 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 ofAttribute. The return object is immutable.- Parameters:
elem- anElementrepresentation ofAttribute.- Returns:
- a new instance of
Attribute. - Throws:
XACMLException- if error occurs while processing theElement.
-
createAttribute
public Attribute createAttribute(String xml) throws XACMLException
Returns a new instance ofAttribute. The return object is immutable.- Parameters:
xml- an XML String representingAttribute.- Returns:
- a new instance of
Attribute. - Throws:
XACMLException- if error occurs while processing the XML string.
-
createXACMLAuthzDecisionQuery
public XACMLAuthzDecisionQuery createXACMLAuthzDecisionQuery()
Returns a new instance ofXACMLAuthzDecisionQuery. 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, SAML2Exception
Returns a new instance ofXACMLAuthzDecisionQuery. The return object is immutable.- Parameters:
elem- anElementrepresentation ofXACMLAuthzDecisionQuery.- Returns:
- a new instance of
XACMLAuthzDecisionQuery. - Throws:
XACMLException- if error occurs while processing theElement.SAML2Exception- if not able to create the base samlRequestAbstract
-
createXACMLAuthzDecisionQuery
public XACMLAuthzDecisionQuery createXACMLAuthzDecisionQuery(String xml) throws XACMLException, SAML2Exception
Returns a new instance ofXACMLAuthzDecisionQuery. The return object is immutable.- Parameters:
xml- an XML String representingXACMLAuthzDecisionQuery.- Returns:
- a new instance of
XACMLAuthzDecisionQuery. - Throws:
XACMLException- if error occurs while processing the XML string.SAML2Exception- if not able to create the base samlRequestAbstract
-
createXACMLAuthzDecisionStatement
public XACMLAuthzDecisionStatement createXACMLAuthzDecisionStatement()
Returns a new instance ofXACMLAuthzDecisionStatement. 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 ofXACMLAuthzDecisionStatement. The return object is immutable.- Parameters:
elem- anElementrepresentation ofXACMLAuthzDecisionStatement.- Returns:
- a new instance of
XACMLAuthzDecisionStatement. - Throws:
XACMLException- if error occurs while processing theElement.
-
createXACMLAuthzDecisionStatement
public XACMLAuthzDecisionStatement createXACMLAuthzDecisionStatement(String xml) throws XACMLException
Returns a new instance ofXACMLAuthzDecisionStatement. The return object is immutable.- Parameters:
xml- an XML String representingXACMLAuthzDecisionStatement.- 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 ofResponse.- Returns:
- a new instance of
Response - Throws:
XACMLException
-
createResponse
public Response createResponse(Element elem) throws XACMLException
Returns a new instance ofResponse. The return object is immutable.- Parameters:
elem- a DOM Element representation ofResponse- 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 ofResponseThe return object is immutable.- Parameters:
xml- a XML string representation ofResponse- 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 ofResult.- Returns:
- a new instance of
Result - Throws:
XACMLException
-
createResult
public Result createResult(Element elem) throws XACMLException
Returns a new instance ofResult. The return object is immutable.- Parameters:
elem- a DOM Element representation ofResult- 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 ofResultThe return object is immutable.- Parameters:
xml- a XML string representation ofResult- 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 ofDecision.- Returns:
- a new instance of
Decision - Throws:
XACMLException
-
createDecision
public Decision createDecision(Element elem) throws XACMLException
Returns a new instance ofDecision. The return object is immutable.- Parameters:
elem- a DOM Element representation ofDecision- 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 ofDecisionThe return object is immutable.- Parameters:
xml- a XML string representation ofDecision- 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 ofStatus.- Returns:
- a new instance of
Status - Throws:
XACMLException
-
createStatus
public Status createStatus(Element elem) throws XACMLException
Returns a new instance ofStatus. The return object is immutable.- Parameters:
elem- a DOM Element representation ofStatus- 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 ofStatusThe return object is immutable.- Parameters:
xml- a XML string representation ofStatus- 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 ofStatusCode.- Returns:
- a new instance of
StatusCode - Throws:
XACMLException
-
createStatusCode
public StatusCode createStatusCode(Element elem) throws XACMLException
Returns a new instance ofStatusCode. The return object is immutable.- Parameters:
elem- a DOM Element representation ofStatusCode- 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 ofStatusCodeThe return object is immutable.- Parameters:
xml- a XML string representation ofStatusCode- 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 ofStatusMessage.- Returns:
- a new instance of
StatusMessage - Throws:
XACMLException
-
createStatusMessage
public StatusMessage createStatusMessage(Element elem) throws XACMLException
Returns a new instance ofStatusMessage. The return object is immutable.- Parameters:
elem- a DOM Element representation ofStatusMessage- 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 ofStatusMessageThe return object is immutable.- Parameters:
xml- a XML string representation ofStatusMessage- 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 ofStatusDetail.- Returns:
- a new instance of
StatusDetail - Throws:
XACMLException
-
createStatusDetail
public StatusDetail createStatusDetail(Element elem) throws XACMLException
Returns a new instance ofStatusDetail. The return object is immutable.- Parameters:
elem- a DOM Element representation ofStatusDetail- 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 ofStatusDetailThe return object is immutable.- Parameters:
xml- a XML string representation ofStatusDetail- Returns:
- a new instance of
StatusDetail - Throws:
XACMLException- if error occurs while processing the XML string
-
-