Package com.sun.identity.saml2.protocol
Class ProtocolFactory
java.lang.Object
com.sun.identity.saml2.protocol.ProtocolFactory
This is the factory class to obtain object instances for concrete elements in
the protocol schema. This factory class provides 3 methods for each element.
createElementName(),
createElementName(String value),
createElementName(org.w3c.dom.Element value).-
Method Summary
Modifier and TypeMethodDescriptioncreateArtifact(byte[] typecode, int endpointIndex, String sourceID, String messageHandle) Returns a new instance ofArtifact.createArtifact(String encodedArtifactValue) Returns a new instance ofArtifact.createArtifact(Element elem) Returns a new instance ofArtifact.Returns a new instance ofArtifactResolve.Returns a new instance ofArtifactResolve.createArtifactResolve(Element elem) Returns a new instance ofArtifactResolve.Returns a new instance ofArtifactResponse.Returns a new instance ofArtifactResponse.Returns a new instance ofArtifactResponse.Returns theAssertionIDRequestObject.createAssertionIDRequest(String value) Returns theAssertionIDRequestObject.createAssertionIDRequest(Element value) Returns theAssertionIDRequestObject.Returns theAttributeQueryObject.createAttributeQuery(String value) Returns theAttributeQueryObject.createAttributeQuery(Element value) Returns theAttributeQueryObject.Returns theAuthnQueryObject.createAuthnQuery(String value) Returns theAuthnQueryObject.createAuthnQuery(Element value) Returns theAuthnQueryObject.Returns theAuthnRequestObject.createAuthnRequest(String value) Returns theAuthnRequestObject.createAuthnRequest(Element value) Returns theAuthnRequestObject.Returns theExtensionsObject.createExtensions(String value) Returns theExtensionsObject.createExtensions(Element value) Returns theExtensionsObject.Returns theGetCompleteObject.createGetComplete(String value) Returns theGetCompleteObject.createGetComplete(Element value) Returns theGetCompleteObject.Returns theIDPEntryObject.createIDPEntry(String value) Returns theIDPEntryObject.createIDPEntry(Element value) Returns theIDPEntryObject.Returns theIDPListObject.createIDPList(String value) Returns theIDPListObject.createIDPList(Element value) Returns theIDPListObject.Returns theLogoutRequestObject.createLogoutRequest(String value) Returns theLogoutRequestObject.createLogoutRequest(Element value) Returns theLogoutRequestObject.Returns theLogoutResponseObject.createLogoutResponse(String value) Returns theLogoutResponseObject.createLogoutResponse(Element value) Returns theLogoutResponseObject.Returns a mutable manage name identifier request object.createManageNameIDRequest(String value) Returns an immutable manage name identifier request object.createManageNameIDRequest(Element value) Returns an immutable manage name identifier request object.Returns a mutable manage name identifier response object.createManageNameIDResponse(String value) Returns an immutable manage name identifier response object.Returns an immutable manage name identifier response object.Returns theNameIDMappingRequestObject.createNameIDMappingRequest(String value) Returns theNameIDMappingRequestObject.Returns theNameIDMappingRequestObject.Returns theNameIDMappingResponseObject.Returns theNameIDMappingResponseObject.Returns theNameIDMappingResponseObject.Returns theNameIDPolicyObject.createNameIDPolicy(String value) Returns theNameIDPolicyObject.createNameIDPolicy(Element value) Returns theNameIDPolicyObject.createNewEncryptedID(String value) Returns an immutable new encrypted identifier object.createNewEncryptedID(Element value) Returns an immutable new encrypted identifier object.createNewID(String value) Returns an new identifier object.createNewID(Element value) Returns an new identifier object.Returns a mutable requested authentication context object.Returns an immutable requested authentication context object.Returns an immutable requested authentication context object.Returns theRequesterIDObject.createRequesterID(String value) Returns theRequesterIDObject.createRequesterID(Element value) Returns theRequesterIDObject.Returns a new instance ofResponse.createResponse(String xml) Returns a new instance ofResponse.createResponse(Element elem) Returns a new instance ofResponse.Returns theScopingObject.createScoping(String value) Returns theScopingObject.createScoping(Element value) Returns theScopingObject.createSessionIndex(String value) Returns theSessionIndexObject.Returns theStatusObject.createStatus(String value) Returns theStatusObject.createStatus(Element value) Returns theStatusObject.Returns theStatusCodeObject.createStatusCode(String value) Returns theStatusCodeObject.createStatusCode(Element value) Returns theStatusCodeObject.Returns theStatusDetailObject.createStatusDetail(String value) Returns theStatusDetailObject.createStatusDetail(Element value) Returns theStatusDetailObject.createStatusMessage(String value) Returns theStatusMessageObject.static ProtocolFactoryReturns an instance of theProtocolFactoryObject.
-
Method Details
-
getInstance
Returns an instance of theProtocolFactoryObject.- Returns:
- an instance of the
ProtocolFactoryobject.
-
createAssertionIDRequest
Returns theAssertionIDRequestObject.- Returns:
- the
AssertionIDRequestobject. - Throws:
SAML2Exception- ifAssertionIDRequestcannot be created.
-
createAssertionIDRequest
Returns theAssertionIDRequestObject.- Parameters:
value- the Document Element ofAssertionIDRequestobject.- Returns:
- the
AssertionIDRequestobject. - Throws:
SAML2Exception- ifAssertionIDRequestcannot be created.
-
createAssertionIDRequest
Returns theAssertionIDRequestObject.- Parameters:
value-AssertionIDRequestXML String.- Returns:
- the
AssertionIDRequestobject. - Throws:
SAML2Exception- ifAssertionIDRequestcannot be created.
-
createAttributeQuery
Returns theAttributeQueryObject.- Returns:
- the
AttributeQueryobject. - Throws:
SAML2Exception- ifAttributeQuerycannot be created.
-
createAttributeQuery
Returns theAttributeQueryObject.- Parameters:
value- the Document Element ofAttributeQueryobject.- Returns:
- the
AttributeQueryobject. - Throws:
SAML2Exception- ifAttributeQuerycannot be created.
-
createAttributeQuery
Returns theAttributeQueryObject.- Parameters:
value-AttributeQueryXML String.- Returns:
- the
AttributeQueryobject. - Throws:
SAML2Exception- ifAttributeQuerycannot be created.
-
createAuthnQuery
Returns theAuthnQueryObject.- Returns:
- the
AuthnQueryobject. - Throws:
SAML2Exception- ifAuthnQuerycannot be created.
-
createAuthnQuery
Returns theAuthnQueryObject.- Parameters:
value- the Document Element ofAuthnQueryobject.- Returns:
- the
AuthnQueryobject. - Throws:
SAML2Exception- ifAuthnQuerycannot be created.
-
createAuthnQuery
Returns theAuthnQueryObject.- Parameters:
value-AuthnQueryXML String.- Returns:
- the
AuthnQueryobject. - Throws:
SAML2Exception- ifAuthnQuerycannot be created.
-
createAuthnRequest
Returns theAuthnRequestObject.- Returns:
- the
AuthnRequestobject. - Throws:
SAML2Exception- ifAuthnRequestcannot be created.
-
createAuthnRequest
Returns theAuthnRequestObject.- Parameters:
value- the Document Element ofAuthnRequestobject.- Returns:
- the
AuthnRequestobject. - Throws:
SAML2Exception- ifAuthnRequestcannot be created.
-
createAuthnRequest
Returns theAuthnRequestObject.- Parameters:
value-AuthnRequestXML String.- Returns:
- the
AuthnRequestobject. - Throws:
SAML2Exception- ifAuthnRequestcannot be created.
-
createExtensions
Returns theExtensionsObject.- Returns:
- the
Extensionsobject. - Throws:
SAML2Exception- ifExtensionscannot be created.
-
createExtensions
Returns theExtensionsObject.- Parameters:
value- the Document Element ofExtensionsobject.- Returns:
- instance of
Extensionsobject. - Throws:
SAML2Exception- ifExtensionscannot be created.
-
createExtensions
Returns theExtensionsObject.- Parameters:
value- XML String Representation ofExtensionsobject.- Returns:
- instance of
Extensionsobject. - Throws:
SAML2Exception- ifExtensionscannot be created.
-
createGetComplete
Returns theGetCompleteObject.- Returns:
- instance of
GetCompleteobject. - Throws:
SAML2Exception- ifGetCompletecannot be created.
-
createGetComplete
Returns theGetCompleteObject.- Parameters:
value- Document Element ofGetCompleteobject.- Returns:
- instance of
GetCompleteObject. - Throws:
SAML2Exception- ifGetCompletecannot be created.
-
createGetComplete
Returns theGetCompleteObject.- Parameters:
value- XML String representation ofGetCompleteobject.- Returns:
- instance of
GetCompleteObject. - Throws:
SAML2Exception- ifGetCompletecannot be created.
-
createIDPEntry
Returns theIDPEntryObject.- Returns:
- instance of
IDPEntryobject. - Throws:
SAML2Exception- ifIDPEntrycannot be created.
-
createIDPEntry
Returns theIDPEntryObject.- Parameters:
value- Document Element ofIDPEntryobject.- Returns:
- instance of
IDPEntryobject. - Throws:
SAML2Exception- ifIDPEntrycannot be created.
-
createIDPEntry
Returns theIDPEntryObject.- Parameters:
value- XML Representation of theIDPEntryobject.- Returns:
- instance of
IDPEntryObject. - Throws:
SAML2Exception- ifIDPEntrycannot be created.
-
createIDPList
Returns theIDPListObject.- Returns:
- instance of
IDPListObject. - Throws:
SAML2Exception- ifIDPListcannot be created.
-
createIDPList
Returns theIDPListObject.- Parameters:
value- Document Element ofIDPListObject.- Returns:
- instance of
IDPListObject. - Throws:
SAML2Exception- ifIDPListcannot be created.
-
createIDPList
Returns theIDPListObject.- Parameters:
value- XML String Representation ofIDPListObject.- Returns:
- instance of
IDPListObject. - Throws:
SAML2Exception- ifIDPListcannot be created.
-
createNameIDPolicy
Returns theNameIDPolicyObject.- Returns:
- instance of
NameIDPolicyObject. - Throws:
SAML2Exception- ifNameIDPolicycannot be created.
-
createNameIDPolicy
Returns theNameIDPolicyObject.- Parameters:
value- Document Element ofNameIDPolicyObject.- Returns:
- instance of
NameIDPolicyObject. - Throws:
SAML2Exception- ifNameIDPolicycannot be created.
-
createNameIDPolicy
Returns theNameIDPolicyObject.- Parameters:
value- XML String Representation ofNameIDPolicyobject.- Returns:
- instance of
NameIDPolicyobject. - Throws:
SAML2Exception- ifNameIDPolicycannot be created.
-
createRequesterID
Returns theRequesterIDObject.- Returns:
- instance of
RequesterIDObject. - Throws:
SAML2Exception- ifRequesterIDcannot be created.
-
createRequesterID
Returns theRequesterIDObject.- Parameters:
value- Document Element ofRequesterIDObject.- Returns:
- instance of
RequesterIDObject. - Throws:
SAML2Exception- ifRequesterIDcannot be created.
-
createRequesterID
Returns theRequesterIDObject.- Parameters:
value- XML String Representation ofRequesterIDobject.- Returns:
- instance of
RequesterIDObject. - Throws:
SAML2Exception- ifRequesterIDcannot be created.
-
createScoping
Returns theScopingObject.- Returns:
- instance of
ScopingObject. - Throws:
SAML2Exception- ifScopingcannot be created.
-
createScoping
Returns theScopingObject.- Parameters:
value- Document Element ofScopingObject.- Returns:
- instance of
ScopingObject. - Throws:
SAML2Exception- ifScopingcannot be created.
-
createScoping
Returns theScopingObject.- Parameters:
value- XML String Representation ofScopingObject.- Returns:
- instance of
ScopingObject. - Throws:
SAML2Exception- ifScopingcannot be created.
-
createRequestedAuthnContext
Returns a mutable requested authentication context object.- Returns:
- the
RequestedAuthnContextobject. - Throws:
SAML2Exception- if it failed to instantiate the object.
-
createRequestedAuthnContext
Returns an immutable requested authentication context object.- Parameters:
value- DOM element representing requested authentication context object.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createRequestedAuthnContext
Returns an immutable requested authentication context object.- Parameters:
value- XML string representing requested authentication context object.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createManageNameIDRequest
Returns a mutable manage name identifier request object.- Returns:
- the
ManageNameIDRequestobject.
-
createManageNameIDRequest
Returns an immutable manage name identifier request object.- Parameters:
value- DOM element representingManageNameIDRequestobject.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createManageNameIDRequest
Returns an immutable manage name identifier request object.- Parameters:
value- XML string representingManageNameIDRequestobject.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createManageNameIDResponse
Returns a mutable manage name identifier response object.- Returns:
- the
ManageNameIDResponseobject.
-
createManageNameIDResponse
Returns an immutable manage name identifier response object.- Parameters:
value- DOM element representingManageNameIDResponseobject.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createManageNameIDResponse
Returns an immutable manage name identifier response object.- Parameters:
value- XML String representingManageNameIDResponseobject.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createNewID
Returns an new identifier object.- Parameters:
value- DOM element representingNewIDobject.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createNewID
Returns an new identifier object.- Parameters:
value- of theNewID.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createNewEncryptedID
Returns an immutable new encrypted identifier object.- Parameters:
value- DOM element representingNewEncryptedIDobject.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createNewEncryptedID
Returns an immutable new encrypted identifier object.- Parameters:
value- XML String representingNewEncryptedIDobject.- Returns:
- an immutable requested authentication context object.
- Throws:
SAML2Exception- if it failed to instantiate the object.
-
createLogoutRequest
Returns theLogoutRequestObject.- Returns:
- the
LogoutRequestobject.
-
createLogoutRequest
Returns theLogoutRequestObject. This object will be immutable.- Parameters:
value- theorg.w3c.dom.Elementobject representing theLogoutRequestobject.- Returns:
- the
LogoutRequestobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createLogoutRequest
Returns theLogoutRequestObject. This object will be immutable.- Parameters:
value- theStringrepresenting theLogoutRequestobject.- Returns:
- the
LogoutRequestobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createLogoutResponse
Returns theLogoutResponseObject.- Returns:
- the
LogoutResponseobject.
-
createLogoutResponse
Returns theLogoutResponseObject. This object will be immutable.- Parameters:
value- theorg.w3c.dom.Elementrepresenting theLogoutResponseobject.- Returns:
- the
LogoutResponseobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createLogoutResponse
Returns theLogoutResponseObject. This object will be immutable.- Parameters:
value- theStringrepresenting theLogoutResponseobject.- Returns:
- the
LogoutResponseobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatus
Returns theStatusObject.- Returns:
- the
Statusobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatus
Returns theStatusObject. This object will be immutable.- Parameters:
value- theorg.w3c.dom.Elementrepresenting theStatusobject.- Returns:
- the
Statusobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatus
Returns theStatusObject. This object will be immutable.- Parameters:
value- theStringrepresenting theStatusobject.- Returns:
- the
Statusobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatusCode
Returns theStatusCodeObject.- Returns:
- the
StatusCodeobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatusCode
Returns theStatusCodeObject. This object will be immutable.- Parameters:
value- theorg.w3c.dom.Elementrepresenting theStatusCodeobject.- Returns:
- the
StatusCodeobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatusCode
Returns theStatusCodeObject. This object will be immutable.- Parameters:
value- theStringrepresenting theStatusCodeobject.- Returns:
- the
StatusCodeobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatusDetail
Returns theStatusDetailObject.- Returns:
- the
StatusDetailobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatusDetail
Returns theStatusDetailObject. This object will be immutable.- Parameters:
value- theorg.w3c.dom.Elementrepresenting theStatusDetailobject.- Returns:
- the
StatusDetailobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatusDetail
Returns theStatusDetailObject. This object will be immutable.- Parameters:
value- theStringrepresenting theStatusDetailobject.- Returns:
- the
StatusDetailobject. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createStatusMessage
Returns theStatusMessageObject.- Parameters:
value- A StringStatusMessagevalue- Returns:
- the
StatusMessageobject.
-
createSessionIndex
Returns theSessionIndexObject.- Parameters:
value- A StringSessionIndexvalue- Returns:
- the
SessionIndexobject.
-
createArtifact
public Artifact createArtifact(byte[] typecode, int endpointIndex, String sourceID, String messageHandle) throws SAML2Exception Returns a new instance ofArtifact.- Parameters:
typecode- two byte sequence representingTypeCode.endpointIndex- integer value representingEndpointIndex.sourceID- String format of 20-byte sequence. Usually obtained from taking the SHA-1 hash of the identification URL (called provider ID).messageHandle- String format of 20-byte sequence identifying a message. This value is constructed from a cryptographically strong random or pseudorandom number sequence.- Returns:
- a new instance of
Artifact. - Throws:
SAML2Exception- if it fails to instantiate the object.
-
createArtifact
Returns a new instance ofArtifact. The return object is immutable.- Parameters:
elem- anElementrepresentation ofArtifact.- Returns:
- a new instance of
Artifact. - Throws:
SAML2Exception- if error occurs while processing theElement.
-
createArtifact
Returns a new instance ofArtifact. The return object is immutable.- Parameters:
encodedArtifactValue-Artifact Base64encoded String.- Returns:
- a new instance of
Artifact. - Throws:
SAML2Exception- if error occurs while processing the XML string.
-
createArtifactResolve
Returns a new instance ofArtifactResolve. Caller may need to call setters of the class to populate the object.- Returns:
- a new instance of
ArtifactResolve.
-
createArtifactResolve
Returns a new instance ofArtifactResolve. The return object is immutable.- Parameters:
elem- anElementrepresentation ofArtifactResolve.- Returns:
- a new instance of
ArtifactResolve. - Throws:
SAML2Exception- if error occurs while processing theElement.
-
createArtifactResolve
Returns a new instance ofArtifactResolve. The return object is immutable.- Parameters:
xml- a XML String representation ofArtifactResolve.- Returns:
- a new instance of
ArtifactResolve. - Throws:
SAML2Exception- if error occurs while processing the XML string.
-
createArtifactResponse
Returns a new instance ofArtifactResponse. Caller may need to call setters of the class to populate the object.- Returns:
- a new instance of
ArtifactResponse.
-
createArtifactResponse
Returns a new instance ofArtifactResponse. The return object is immutable.- Parameters:
elem- anElementrepresentingArtifactResponse.- Returns:
- a new instance of
ArtifactResponse. - Throws:
SAML2Exception- if error occurs while processing theElement.
-
createArtifactResponse
Returns a new instance ofArtifactResponse. The return object is immutable.- Parameters:
xml- a XML String representation ofArtifactResponse.- Returns:
- a new instance of
ArtifactResponse. - Throws:
SAML2Exception- if error occurs while processing the XML string.
-
createResponse
Returns a new instance ofResponse. Caller may need to call setters of the class to populate the object.- Returns:
- a new instance of
Response.
-
createResponse
Returns a new instance ofResponse. The return object is immutable.- Parameters:
elem- anElementrepresentation ofResponse.- Returns:
- a new instance of
Response. - Throws:
SAML2Exception- if error occurs while processing theElement.
-
createResponse
Returns a new instance ofResponse. The return object is immutable.- Parameters:
xml- a XML String representation ofResponse.- Returns:
- a new instance of
Response. - Throws:
SAML2Exception- if error occurs while processing the XML string.
-
createNameIDMappingRequest
Returns theNameIDMappingRequestObject.- Returns:
- the
NameIDMappingRequestobject.
-
createNameIDMappingRequest
Returns theNameIDMappingRequestObject.- Parameters:
elem- the Document Element ofNameIDMappingRequestobject.- Returns:
- the
NameIDMappingRequestobject. - Throws:
SAML2Exception- ifNameIDMappingRequestcannot be created.
-
createNameIDMappingRequest
Returns theNameIDMappingRequestObject.- Parameters:
value-NameIDMappingRequestXML String.- Returns:
- the
NameIDMappingRequestobject. - Throws:
SAML2Exception- ifNameIDMappingRequestcannot be created.
-
createNameIDMappingResponse
Returns theNameIDMappingResponseObject.- Returns:
- the
NameIDMappingResponseobject.
-
createNameIDMappingResponse
Returns theNameIDMappingResponseObject.- Parameters:
elem- the Document Element ofNameIDMappingResponseobject.- Returns:
- the
NameIDMappingResponseobject. - Throws:
SAML2Exception- ifNameIDMappingResponsecannot be created.
-
createNameIDMappingResponse
Returns theNameIDMappingResponseObject.- Parameters:
value-NameIDMappingResponseXML String.- Returns:
- the
NameIDMappingResponseobject. - Throws:
SAML2Exception- ifNameIDMappingResponsecannot be created.
-