Class AttributeStatementImpl
- java.lang.Object
-
- com.sun.identity.saml2.assertion.impl.AttributeStatementImpl
-
- All Implemented Interfaces:
AttributeStatement,Statement
public class AttributeStatementImpl extends Object implements AttributeStatement
This is a default implementation ofAttributeStatement. TheAttributeStatementelement describes a statement by the SAML authority asserting that the assertion subject is associated with the specified attributes. It is of typeAttributeStatementType.<complexType name="AttributeStatementType"> <complexContent> <extension base="{urn:oasis:names:tc:SAML:2.0:assertion} StatementAbstractType"> <choice maxOccurs="unbounded"> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion}Attribute"/> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} EncryptedAttribute"/> </choice> </extension> </complexContent> </complexType>
-
-
Constructor Summary
Constructors Constructor Description AttributeStatementImpl()Class constructor.AttributeStatementImpl(String xmlString)Class constructor withAttributeStatementin xml string format.AttributeStatementImpl(Element element)Class constructor withAttributeStatementinElementformat.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Attribute>getAttribute()ReturnsAttribute(s) of the statement.List<EncryptedAttribute>getEncryptedAttribute()ReturnsEncryptedAttribute(s) of the statement.booleanisMutable()Returns the mutability of the object.voidmakeImmutable()Makes the object immutable.voidsetAttribute(List<Attribute> value)SetsAttribute(s) of the statement.voidsetEncryptedAttribute(List value)SetsEncryptedAttribute(s) of the statement.StringtoXMLString()Returns a String representation of the element.StringtoXMLString(boolean includeNS, boolean declareNS)Returns a String representation of the element.
-
-
-
Constructor Detail
-
AttributeStatementImpl
public AttributeStatementImpl()
Class constructor. Caller may need to call setters to populate the object.
-
AttributeStatementImpl
public AttributeStatementImpl(Element element) throws SAML2Exception
Class constructor withAttributeStatementinElementformat.- Throws:
SAML2Exception
-
AttributeStatementImpl
public AttributeStatementImpl(String xmlString) throws SAML2Exception
Class constructor withAttributeStatementin xml string format.- Throws:
SAML2Exception
-
-
Method Detail
-
getAttribute
public List<Attribute> getAttribute()
ReturnsAttribute(s) of the statement.- Specified by:
getAttributein interfaceAttributeStatement- Returns:
- List of
Attribute(s) in the statement. - See Also:
setAttribute(List)
-
setAttribute
public void setAttribute(List<Attribute> value) throws SAML2Exception
SetsAttribute(s) of the statement.- Specified by:
setAttributein interfaceAttributeStatement- Parameters:
value- List of newAttribute(s).- Throws:
SAML2Exception- if the object is immutable.- See Also:
getAttribute()
-
getEncryptedAttribute
public List<EncryptedAttribute> getEncryptedAttribute()
ReturnsEncryptedAttribute(s) of the statement.- Specified by:
getEncryptedAttributein interfaceAttributeStatement- Returns:
- List of
EncryptedAttribute(s) in the statement. - See Also:
setEncryptedAttribute(List)
-
setEncryptedAttribute
public void setEncryptedAttribute(List value) throws SAML2Exception
SetsEncryptedAttribute(s) of the statement.- Specified by:
setEncryptedAttributein interfaceAttributeStatement- Parameters:
value- List of newEncryptedAttribute(s).- Throws:
SAML2Exception- if the object is immutable.- See Also:
getEncryptedAttribute()
-
makeImmutable
public void makeImmutable()
Makes the object immutable.- Specified by:
makeImmutablein interfaceStatement
-
isMutable
public boolean isMutable()
Returns the mutability of the object.
-
toXMLString
public String toXMLString() throws SAML2Exception
Returns a String representation of the element.- Specified by:
toXMLStringin interfaceStatement- Returns:
- A string containing the valid XML for this element. By default name space name is prepended to the element name.
- Throws:
SAML2Exception- if the object does not conform to the schema.
-
toXMLString
public String toXMLString(boolean includeNS, boolean declareNS) throws SAML2Exception
Returns a String representation of the element.- Specified by:
toXMLStringin interfaceStatement- Parameters:
includeNS- 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 containing the valid XML for this element
- Throws:
SAML2Exception- if the object does not conform to the schema.
-
-