Package com.sun.identity.saml.assertion
Class NameIdentifier
java.lang.Object
com.sun.identity.saml.assertion.NameIdentifier
The NameIdentifier element specifies a
Subject
by a
combination of a name and a security domain governing the name of the
Subject
.-
Constructor Summary
ModifierConstructorDescriptionprotected
Default contructorNameIdentifier
(String name) ConstructorNameIdentifier
(String name, String nameQualifier) Constructs aNameQualifier
instance.NameIdentifier
(String name, String nameQualifier, String format) Constructs aNameQualifier
instance.NameIdentifier
(Element nameIdentifierElement) Constructs aNameIdentifer
element from an existing XML block. -
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(NameIdentifier nid) Checks for equality between this object and theNameQualifier
passed down as parameter.Returns format.getName()
Returns the name fromNameQualifier
.Returns the name.boolean
Sets the format attribute.protected boolean
Sets the name attribute.boolean
setNameQualifier
(String nameQualifier) SetsnameQualifier
attribute.toString()
Returns a String representation of the element.toString
(boolean includeNS, boolean declareNS) Returns String representation of the<NameIdentifier>
element.
-
Constructor Details
-
NameIdentifier
protected NameIdentifier()Default contructor -
NameIdentifier
Constructs aNameIdentifer
element from an existing XML block.- Parameters:
nameIdentifierElement
- Aorg.w3c.dom.Element
representing DOM tree forNameIdentifier
object- Throws:
SAMLException
- if it could not process theorg.w3c.dom.Element
properly, implying that there is an error in the sender or in the element definition.
-
NameIdentifier
Constructor- Parameters:
name
- - The string representing the name of the Subject- Throws:
SAMLException
- if the input has an error.
-
NameIdentifier
Constructs aNameQualifier
instance.- Parameters:
name
- The string representing the name of the SubjectnameQualifier
- The security or administrative domain that qualifies the name of theSubject
. This is optional, could be null or "".- Throws:
SAMLException
- if the input has an error.
-
NameIdentifier
Constructs aNameQualifier
instance.- Parameters:
name
- The string representing the name of the SubjectnameQualifier
- The security or administrative domain that qualifies the name of theSubject
. This is optional could be null or "".format
- The syntax used to describe the name of theSubject
. This optional, could be null or "".- Throws:
SAMLException
- if the input has an error.
-
-
Method Details
-
getFormat
Returns format.- Returns:
- format element. Returns null if there is no format specified.
-
setFormat
Sets the format attribute.- Parameters:
format
- A String representing the format.- Returns:
- true if operation succeeds.
-
getNameQualifier
Returns the name.- Returns:
- A String representing the
nameQualifier
. Returns null if there is nonameQualifier
.
-
setNameQualifier
SetsnameQualifier
attribute.- Parameters:
nameQualifier
- name qualifier.- Returns:
- true if operation succeeds.
-
setName
Sets the name attribute.- Parameters:
name
- name of thenameQualifier
.- Returns:
- true if operation succeeds.
-
getName
Returns the name fromNameQualifier
.- Returns:
- name
-
toString
Returns a String representation of the element. -
toString
Returns String representation of the<NameIdentifier>
element.- 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 containing the valid XML for this element
-
equals
Checks for equality between this object and theNameQualifier
passed down as parameter. Checks if Name is equal and if it hasNameQualifier
and Format defined checks for equality in those too.- Parameters:
nid
-NameIdentifier
to be checked- Returns:
- true if the two
NameQualifier
are equal or not
-