Class ResponseImpl
- java.lang.Object
-
- com.sun.identity.saml2.protocol.impl.StatusResponseImpl
-
- com.sun.identity.saml2.protocol.impl.ResponseImpl
-
- All Implemented Interfaces:
Response
,StatusResponse
public class ResponseImpl extends StatusResponseImpl implements Response
This is an implementation of interfaceResponse
. TheResponse
message element is used when a response consists of a list of zero or more assertions that satisfy the request. It has the complex typeResponseType
.<complexType name="ResponseType"> <complexContent> <extension base="{urn:oasis:names:tc:SAML:2.0:protocol}StatusResponseType"> <choice maxOccurs="unbounded" minOccurs="0"> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion}Assertion"/> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion}EncryptedAssertion"/> </choice> </extension> </complexContent> </complexType>
-
-
Field Summary
-
Fields inherited from class com.sun.identity.saml2.protocol.impl.StatusResponseImpl
consent, destination, extensions, inResponseTo, isMutable, isSignatureValid, isSigned, issueInstant, issuer, publicKey, responseId, signatureString, signedXMLString, status, version
-
-
Constructor Summary
Constructors Constructor Description ResponseImpl()
Class constructor.ResponseImpl(String xmlString)
Class constructor withResponse
in xml string format.ResponseImpl(Element element)
Class constructor withResponse
inElement
format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List
getAssertion()
ReturnsAssertion
(s) of the response.List
getEncryptedAssertion()
ReturnsEncryptedAssertion
(s) of the response.void
makeImmutable()
Makes this object immutable.void
setAssertion(List value)
Sets Assertion(s) of the response.void
setEncryptedAssertion(List value)
SetsEncryptedAssertion
(s) of the response.String
toXMLString()
Returns a String representation of this Object.String
toXMLString(boolean includeNSPrefix, boolean declareNS)
Returns a String representation of this Object.-
Methods inherited from class com.sun.identity.saml2.protocol.impl.StatusResponseImpl
getConsent, getDestination, getExtensions, getID, getInResponseTo, getIssueInstant, getIssuer, getSignature, getStatus, getVersion, isMutable, isSignatureValid, isSigned, setConsent, setDestination, setExtensions, setID, setInResponseTo, setIssueInstant, setIssuer, setStatus, setVersion, sign, validateData, validateID, validateIssueInstant, validateStatus, validateVersion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.identity.saml2.protocol.StatusResponse
getConsent, getDestination, getExtensions, getID, getInResponseTo, getIssueInstant, getIssuer, getSignature, getStatus, getVersion, isMutable, isSignatureValid, isSigned, setConsent, setDestination, setExtensions, setID, setInResponseTo, setIssueInstant, setIssuer, setStatus, setVersion, sign
-
-
-
-
Constructor Detail
-
ResponseImpl
public ResponseImpl()
Class constructor. Caller may need to call setters to populate the object.
-
ResponseImpl
public ResponseImpl(Element element) throws SAML2Exception
Class constructor withResponse
inElement
format.- Parameters:
element
- the Document Element.- Throws:
SAML2Exception
- if there is an error.
-
ResponseImpl
public ResponseImpl(String xmlString) throws SAML2Exception
Class constructor withResponse
in xml string format.- Parameters:
xmlString
- the Response String..- Throws:
SAML2Exception
- if there is an error.
-
-
Method Detail
-
getAssertion
public List getAssertion()
ReturnsAssertion
(s) of the response.- Specified by:
getAssertion
in interfaceResponse
- Returns:
- List of
Assertion
(s) in the response. - See Also:
setAssertion(List)
-
setAssertion
public void setAssertion(List value) throws SAML2Exception
Sets Assertion(s) of the response.- Specified by:
setAssertion
in interfaceResponse
- Parameters:
value
- List of newAssertion
(s).- Throws:
SAML2Exception
- if the object is immutable.- See Also:
getAssertion()
-
getEncryptedAssertion
public List getEncryptedAssertion()
ReturnsEncryptedAssertion
(s) of the response.- Specified by:
getEncryptedAssertion
in interfaceResponse
- Returns:
- List of
EncryptedAssertion
(s) in the response. - See Also:
setEncryptedAssertion(List)
-
setEncryptedAssertion
public void setEncryptedAssertion(List value) throws SAML2Exception
SetsEncryptedAssertion
(s) of the response.- Specified by:
setEncryptedAssertion
in interfaceResponse
- Parameters:
value
- List of newEncryptedAssertion
(s).- Throws:
SAML2Exception
- if the object is immutable.- See Also:
getEncryptedAssertion()
-
makeImmutable
public void makeImmutable()
Makes this object immutable.- Specified by:
makeImmutable
in interfaceStatusResponse
- Overrides:
makeImmutable
in classStatusResponseImpl
-
toXMLString
public String toXMLString() throws SAML2Exception
Returns a String representation of this Object.- Specified by:
toXMLString
in interfaceStatusResponse
- Overrides:
toXMLString
in classStatusResponseImpl
- Returns:
- a String representation of this Object.
- Throws:
SAML2Exception
- if it could not create String object
-
toXMLString
public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
Returns a String representation of this Object.- Specified by:
toXMLString
in interfaceStatusResponse
- Overrides:
toXMLString
in classStatusResponseImpl
- Parameters:
includeNSPrefix
- determines whether or not the namespace qualifier is prepended to the Element when converteddeclareNS
- determines whether or not the namespace is declared within the Element.- Returns:
- a String representation of this Object.
- Throws:
SAML2Exception
- if it could not create String object.
-
-