element SHOULD NOT identify more than one 
principal.
| Constructor Summary | 
| Subject(org.w3c.dom.Element subjectElement)This constructor builds a subject element from an existing XML block
 which has already been built into a DOM.
 | 
| Subject(NameIdentifier nameIdentifier)Constructs a Subject object from a
 NameIdentifierobject. | 
| Subject(NameIdentifier nameIdentifier,
        SubjectConfirmation subjectConfirmation)Constructs a Subject object from a
 NameIdentifierobject and aSubjectConfirmationobject. | 
| Subject(SubjectConfirmation subjectConfirmation)Constructs a Subject object from a
 SubjectConfirmationobject. | 
 
 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
Subject
public Subject(NameIdentifier nameIdentifier,
               SubjectConfirmation subjectConfirmation)
        throws SAMLException
- Constructs a Subject object from a NameIdentifierobject and aSubjectConfirmationobject.
- 
- Parameters:
- nameIdentifier-- NameIdentifierobject.
- subjectConfirmation-- SubjectConfirmationobject.
- Throws:
- SAMLException- if it could not process the 
            Element properly, implying that there is an error in the
            sender or in the element definition.
 
Subject
public Subject(NameIdentifier nameIdentifier)
        throws SAMLException
- Constructs a Subject object from a NameIdentifierobject.
- 
- Parameters:
- nameIdentifier-- NameIdentifierobject.
- Throws:
- SAMLException- if it could not process the- Elementproperly, implying that there is an error in the sender or in
            the element definition.
 
Subject
public Subject(org.w3c.dom.Element subjectElement)
        throws SAMLException
- This constructor builds a subject element from an existing XML block
 which has already been built into a DOM.- 
- Parameters:
- subjectElement- An Element representing DOM tree for Subject object
- Throws:
- SAMLException- if it could not process the Element properly,
            implying that there is an error in the sender or in the 
            element definition.
 
Subject
public Subject(SubjectConfirmation subjectConfirmation)
        throws SAMLException
- Constructs a Subject object from a SubjectConfirmationobject.
- 
- Parameters:
- subjectConfirmation-- SubjectConfirmationobject to
        be added to the object.
- Throws:
- SAMLException- if- subjectConfirmationis null.
 
equals
public boolean equals(Subject subject)
- Checks for equality between this object and the Subject
 passed down as parameter. If NameIdentifieris present,
 checks for its equality by callingNameidentifier.equals().
 ifSubjectConfirmationis present callsequals()method ofSubjectConfirmationtoo
 passing in the subject'sSubjectConfirmationelement.
- 
- Parameters:
- subject- Subject to be checked.
- Returns:
- true if this object and subjectare equals.
 
setSubjectConfirmation
public boolean setSubjectConfirmation(SubjectConfirmation subjectConfirmation)
- Set the subject confirmation to the subject- 
- Parameters:
- subjectConfirmation-- SubjectConfirmationto be set.
- Returns:
- true if operation succeed.
 
removeSubjectConfirmation
public boolean removeSubjectConfirmation()
- Removes subject confirmation from the subject.- 
- Returns:
- true if the operation succeeds.
 
setNameIdentifier
public boolean setNameIdentifier(NameIdentifier nameIdentifier)
- Set the NameIdentifierto the subject.
- 
- Parameters:
- nameIdentifier-- NameIdentifierto be set.
- Returns:
- true if the operation succeeds.
 
removeNameIdentifier
public boolean removeNameIdentifier()
- Removes NameIdentifierfrom the subject.
- 
- Returns:
- true if operation succeeds.
 
getNameIdentifier
public NameIdentifier getNameIdentifier()
- Get the NameIdentifierwithin the Subject element
- 
- Returns:
- NameIdentifierobject, within this Subject.
 
getSubjectConfirmation
public SubjectConfirmation getSubjectConfirmation()
- Get the SubjectConfirmationwithin the Subject element
- 
- Returns:
- SubjectConfirmationobject, within this Subject if 
exists else null
 
toString
public java.lang.String toString()
- Returns a String representation of the element.- 
- Overrides:
- toStringin class- java.lang.Object
 
- 
- Returns:
- A string containing the valid XML for this element
         By default name space name is prepended to the element name
         example <saml:Subject>
 
toString
public java.lang.String toString(boolean includeNS,
                                 boolean declareNS)
- Returns a String representation of the <Subject>element.
- 
- Parameters:
- includeNS- if true prepends all elements by their Namespace 
        name example- <saml:Subject>.
- declareNS- if true includes the namespace within the 
        generated XML.
- Returns:
- A string containing the valid XML for this element.
 
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.