com.sun.identity.saml.assertion
クラス Subject

java.lang.Object
  上位を拡張 com.sun.identity.saml.assertion.Subject
直系の既知のサブクラス:
FSSubject, ProxySubject

public class Subject
extends Object

The Subject element specifies one or more subjects. It contains either or both of the following elements: NameIdentifier An identification of a subject by its name and security domain. SubjectConfirmation Information that allows the subject to be authenticated. If a Subject element contains more than one subject specification, the issuer is asserting that the surrounding statement is true for all of the subjects specified. For example, if both a NameIdentifier and a SubjectConfirmation element are present, the issuer is asserting that the statement is true of both subjects being identified. A Subject element SHOULD NOT identify more than one principal.


フィールドの概要
protected  NameIdentifier _nameIdentifier
           
protected  SubjectConfirmation _subjectConfirmation
           
 
コンストラクタの概要
protected Subject()
          Default constructor
  Subject(Element subjectElement)
          Constructs 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 NameIdentifier object.
  Subject(NameIdentifier nameIdentifier, SubjectConfirmation subjectConfirmation)
          Constructs a Subject object from a NameIdentifier object and a SubjectConfirmation object.
  Subject(SubjectConfirmation subjectConfirmation)
          Constructs a Subject object from a SubjectConfirmation object.
 
メソッドの概要
protected  NameIdentifier createNameIdentifier(Element nameIdentifierElement)
           
protected  SubjectConfirmation createSubjectConfirmation(Element subjectConfirmationElement)
           
 boolean equals(Subject subject)
          Checks for equality between this object and the Subject passed down as parameter.
 NameIdentifier getNameIdentifier()
          Gets the NameIdentifier within the Subject element
 SubjectConfirmation getSubjectConfirmation()
          Gets the SubjectConfirmation within the Subject element
 boolean removeNameIdentifier()
          Removes NameIdentifier from the subject.
 boolean removeSubjectConfirmation()
          Removes subject confirmation from the subject.
 boolean setNameIdentifier(NameIdentifier nameIdentifier)
          Sets the NameIdentifier to the subject.
 boolean setSubjectConfirmation(SubjectConfirmation subjectConfirmation)
          Sets the subject confirmation to the subject
 String toString()
          Returns a String representation of the element.
 String toString(boolean includeNS, boolean declareNS)
          Returns a String representation of the <Subject> element.
 

フィールドの詳細

_subjectConfirmation

protected SubjectConfirmation _subjectConfirmation

_nameIdentifier

protected NameIdentifier _nameIdentifier
コンストラクタの詳細

Subject

protected Subject()
Default constructor


Subject

public Subject(NameIdentifier nameIdentifier,
               SubjectConfirmation subjectConfirmation)
        throws SAMLException
Constructs a Subject object from a NameIdentifier object and a SubjectConfirmation object.

パラメータ:
nameIdentifier - NameIdentifier object.
subjectConfirmation - SubjectConfirmation object.
例外:
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 NameIdentifier object.

パラメータ:
nameIdentifier - NameIdentifier object.
例外:
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(Element subjectElement)
        throws SAMLException
Constructs a subject element from an existing XML block which has already been built into a DOM.

パラメータ:
subjectElement - An Element representing DOM tree for Subject object
例外:
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 SubjectConfirmation object.

パラメータ:
subjectConfirmation - SubjectConfirmation object to be added to the object.
例外:
SAMLException - if subjectConfirmation is null.
メソッドの詳細

equals

public boolean equals(Subject subject)
Checks for equality between this object and the Subject passed down as parameter. If NameIdentifier is present, checks for its equality by calling Nameidentifier.equals(). if SubjectConfirmation is present calls equals() method of SubjectConfirmation too passing in the subject's SubjectConfirmation element.

パラメータ:
subject - Subject to be checked.
戻り値:
true if this object and subject are equals.

setSubjectConfirmation

public boolean setSubjectConfirmation(SubjectConfirmation subjectConfirmation)
Sets the subject confirmation to the subject

パラメータ:
subjectConfirmation - SubjectConfirmation to be set.
戻り値:
true if operation succeed.

removeSubjectConfirmation

public boolean removeSubjectConfirmation()
Removes subject confirmation from the subject.

戻り値:
true if the operation succeeds.

setNameIdentifier

public boolean setNameIdentifier(NameIdentifier nameIdentifier)
Sets the NameIdentifier to the subject.

パラメータ:
nameIdentifier - NameIdentifier to be set.
戻り値:
true if the operation succeeds.

removeNameIdentifier

public boolean removeNameIdentifier()
Removes NameIdentifier from the subject.

戻り値:
true if operation succeeds.

getNameIdentifier

public NameIdentifier getNameIdentifier()
Gets the NameIdentifier within the Subject element

戻り値:
NameIdentifier object, within this Subject.

getSubjectConfirmation

public SubjectConfirmation getSubjectConfirmation()
Gets the SubjectConfirmation within the Subject element

戻り値:
SubjectConfirmation object, within this Subject if exists else null

toString

public String toString()
Returns a String representation of the element.

オーバーライド:
クラス Object 内の toString
戻り値:
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 String toString(boolean includeNS,
                       boolean declareNS)
Returns a String representation of the <Subject> element.

パラメータ:
includeNS - if true prepends all elements by their Namespace name example <saml:Subject>.
declareNS - if true includes the namespace within the generated XML.
戻り値:
A string containing the valid XML for this element.

createNameIdentifier

protected NameIdentifier createNameIdentifier(Element nameIdentifierElement)
                                       throws SAMLException
例外:
SAMLException

createSubjectConfirmation

protected SubjectConfirmation createSubjectConfirmation(Element subjectConfirmationElement)
                                                 throws SAMLException
例外:
SAMLException