Interface Attribute

All Superinterfaces:
XmlSerializable

@SupportedAll public interface Attribute extends XmlSerializable
The Attribute element identifies an attribute by name and optionally includes its value(s). It has the AttributeType complex type.

 <complexType name="AttributeType">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element ref="{urn:oasis:names:tc:SAML:2.0:assertion}
         AttributeValue" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
       <attribute name="FriendlyName"
       type="{http://www.w3.org/2001/XMLSchema}string" />
       <attribute name="Name" use="required"
       type="{http://www.w3.org/2001/XMLSchema}string" />
       <attribute name="NameFormat"
       type="{http://www.w3.org/2001/XMLSchema}anyURI" />
     </restriction>
   </complexContent>
 </complexType>
 
  • Method Details

    • makeImmutable

      void makeImmutable()
      Makes the object immutable.
    • isMutable

      boolean isMutable()
      Returns the mutability of the object.
      Returns:
      true if the object is mutable; false otherwise.
    • getAttributeValue

      List getAttributeValue()
      Returns the AttributeValue(s) of the Attribute.
      Returns:
      List of xml String representing AttributeValue(s) of the Attribute.
      See Also:
    • setAttributeValue

      void setAttributeValue(List value) throws com.sun.identity.saml2.common.SAML2Exception
      Sets the AttributeValue(s) of the Attribute.
      Parameters:
      value - List of xml String representing the new AttributeValue element(s).
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if the object is immutable.
      See Also:
    • getAttributeValueString

      List<String> getAttributeValueString()
      Returns the AttributeValue(s) of the Attribute.
      Returns:
      List of String representing the value of AttributeValue(s).
      See Also:
    • setAttributeValueString

      void setAttributeValueString(List value) throws com.sun.identity.saml2.common.SAML2Exception
      Sets the value of AttributeValue element(s).
      Parameters:
      value - List of String representing the value of the new AttributeValue element(s).
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if the object is immutable.
      See Also:
    • getName

      String getName()
      Returns the Name of the attribute.
      Returns:
      the Name of the attribute.
      See Also:
    • setName

      void setName(String value) throws com.sun.identity.saml2.common.SAML2Exception
      Sets the Name of the attribute.
      Parameters:
      value - new Name of the attribute.
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if the object is immutable.
      See Also:
    • getNameFormat

      String getNameFormat()
      Returns the NameFormat of the attribute.
      Returns:
      the value of NameFormat.
      See Also:
    • setNameFormat

      void setNameFormat(String value) throws com.sun.identity.saml2.common.SAML2Exception
      Sets the NameFormat of the attribute.
      Parameters:
      value - new NameFormat of the attribute.
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if the object is immutable.
      See Also:
    • getFriendlyName

      String getFriendlyName()
      Returns the FriendlyName of the attribute.
      Returns:
      the value of FriendlyName of the attribute.
      See Also:
    • setFriendlyName

      void setFriendlyName(String value) throws com.sun.identity.saml2.common.SAML2Exception
      Sets the FriendlyName of the attribute.
      Parameters:
      value - new FriendlyName of the attribute.
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if the object is immutable.
      See Also:
    • getAnyAttribute

      Map getAnyAttribute()
      Returns the anyAttribute of the attribute.
      Returns:
      A Map containing name/value pairs of anyAttribute. Both the name and value are String object types.
      See Also:
    • setAnyAttribute

      void setAnyAttribute(Map value) throws com.sun.identity.saml2.common.SAML2Exception
      Sets the anyAttribute of the attribute.
      Parameters:
      value - Map of name/value pairs to be set. Both the name and value are String object types.
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if the object is immutable.
      See Also:
    • encrypt

      EncryptedAttribute encrypt(com.sun.identity.saml2.key.EncryptionConfig encryptionConfig, String recipientEntityID) throws com.sun.identity.saml2.common.SAML2Exception
      Returns an EncryptedAttribute object.
      Parameters:
      encryptionConfig - The encryption config.
      recipientEntityID - Unique identifier of the recipient, it is used as the index to the cached secret key so that the key can be reused for the same recipient; It can be null in which case the secret key will be generated every time and will not be cached and reused. Note that the generation of a secret key is a relatively expensive operation.
      Returns:
      EncryptedAttribute object
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if error occurs during the encryption process.