Class AttributeStatement


  • @SupportedAll
    public class AttributeStatement
    extends SubjectStatement
    The AttributeStatement element supplies a statement by the issuer that the specified subject is associated with the specified attributes.
    • Constructor Detail

      • AttributeStatement

        protected AttributeStatement()
        Dafault constructor
      • AttributeStatement

        public AttributeStatement​(Element element)
                           throws SAMLException
        Constructs an AttributStatement element from an existing XML block
        Parameters:
        element - representing a DOM tree element
        Throws:
        SAMLException - if there is an error in the sender or in the element definition.
      • AttributeStatement

        public AttributeStatement​(Subject subject,
                                  List attribute)
                           throws SAMLException
        Constructs an instance of AttributeStatement.
        Parameters:
        subject - (required) A Subject object.
        attribute - (one or more) A List of Attribute objects.
        Throws:
        SAMLException - if there is an error in the sender.
    • Method Detail

      • getAttribute

        public List getAttribute()
        Gets attribute from Attribute statement
        Returns:
        A list of Attributes contained in this statement
      • getStatementType

        public int getStatementType()
        Gets the type of statement.
        Specified by:
        getStatementType in class Statement
        Returns:
        an Integer which is Statement.ATTRIBUTE_STATEMENT.
      • toString

        public String toString()
        Creates a String representation of the attribute statement
        Overrides:
        toString in class Object
        Returns:
        A string representation of the AttributeStatement element
      • toString

        public String toString​(boolean includeNS,
                               boolean declareNS)
        Returns a String representation of the Attribute statement.
        Specified by:
        toString in class SubjectStatement
        Parameters:
        includeNS - Determines whether or not the namespace qualifier is prepended to the Element when converted
        declareNS - Determines whether or not the namespace is declared within the Element.
        Returns:
        A string representation of the <saml:AttributeStatement> element.