|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensaml.SAMLObject
org.opensaml.SAMLNameIdentifier
public class SAMLNameIdentifier
Represents a SAML Subject
| Field Summary | |
|---|---|
protected String |
format
|
static String |
FORMAT_EMAIL
Email Format Identifier |
static String |
FORMAT_UNSPECIFIED
Unspecified Format Identifier |
static String |
FORMAT_WINDOWS
Windows Domain Format Identifier |
static String |
FORMAT_X509
X.509 Subject Format Identifier |
protected static Hashtable |
formatMap
Maps formats to Java class implementations |
protected String |
name
|
protected String |
nameQualifier
|
| Fields inherited from class org.opensaml.SAMLObject |
|---|
config, dirty, log, parentObject, root |
| Constructor Summary | |
|---|---|
SAMLNameIdentifier()
Default constructor |
|
SAMLNameIdentifier(Element e)
Reconstructs a name identifier from a DOM tree |
|
SAMLNameIdentifier(InputStream in)
Reconstructs a name identifier from a stream |
|
SAMLNameIdentifier(String name,
String nameQualifier,
String format)
Builds a name identifier out of its component parts |
|
| Method Summary | |
|---|---|
protected Element |
buildRoot(Document doc,
boolean xmlns)
Delegates the process of building the root element of an object and inserting appropriate namespaces. |
void |
checkValidity()
Evaluates the object's content to see if it is currently valid if serialized. |
Object |
clone()
Copies a SAML object such that no dependencies exist between the original and the copy |
void |
fromDOM(Element e)
Initialization of an object from a DOM element |
String |
getFormat()
Gets the format of the name |
static SAMLNameIdentifier |
getInstance(Element e)
Locates an implementation class for a NameIdentifier based on Format and constructs it based on the DOM provided. |
static SAMLNameIdentifier |
getInstance(InputStream in)
Locates an implementation class for a NameIdentifier based on Format and constructs it based on the stream provided. |
static SAMLNameIdentifier |
getInstance(String format)
Locates an implementation class for a NameIdentifier based on Format and constructs an empty instance. |
String |
getName()
Gets the name of the Subject |
String |
getNameQualifier()
Gets the name qualifier |
static void |
regFactory(String format,
String className)
Registers a class to handle a specific NameID format when parsing XML |
void |
setFormat(String format)
Sets the format of the name |
void |
setName(String name)
Sets the name of the Subject |
void |
setNameQualifier(String nameQualifier)
Sets the name qualifier |
Node |
toDOM(Document doc,
boolean xmlns)
Transforms the object into a DOM tree using an existing document context |
static void |
unregFactory(String format)
Unregisters a class to handle a specific NameID format when parsing XML |
| Methods inherited from class org.opensaml.SAMLObject |
|---|
fromStream, fromStream, getParent, plantRoot, setDirty, setParent, toBase64, toDOM, toDOM, toDOM, toStream, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected String nameQualifier
protected String format
protected static Hashtable formatMap
public static final String FORMAT_UNSPECIFIED
public static final String FORMAT_EMAIL
public static final String FORMAT_X509
public static final String FORMAT_WINDOWS
| Constructor Detail |
|---|
public SAMLNameIdentifier()
public SAMLNameIdentifier(String name,
String nameQualifier,
String format)
throws SAMLException
name - Name of subject (optional)nameQualifier - Federates or qualifies subject name (optional)format - URI describing name semantics and format (optional)
SAMLException - Raised if a name cannot be constructed
from the supplied information
public SAMLNameIdentifier(Element e)
throws SAMLException
e - The root of a DOM tree
SAMLException - Thrown if the object cannot be constructed
public SAMLNameIdentifier(InputStream in)
throws SAMLException
in - A stream containing XML
SAMLException - Raised if an exception occurs while constructing
the object.| Method Detail |
|---|
public static void regFactory(String format,
String className)
format - The format URI to registerclassName - The Java class that handles this formatpublic static void unregFactory(String format)
type - The format URI to unregister
public static SAMLNameIdentifier getInstance(Element e)
throws SAMLException
e - The root of a DOM containing the SAML condition
SAMLException - Thrown if an error occurs while constructing the object
public static SAMLNameIdentifier getInstance(InputStream in)
throws SAMLException
in - The stream to deserialize from
SAMLException - Thrown if an error occurs while constructing the object
public static SAMLNameIdentifier getInstance(String format)
throws SAMLException
format - The format, indicating which implementation class to use
SAMLException - Thrown if an error occurs while constructing the object
public void fromDOM(Element e)
throws SAMLException
SAMLObject
fromDOM in class SAMLObjecte - Root element of a DOM tree
SAMLException - Raised if an exception occurs while constructing
the objectSAMLObject.fromDOM(org.w3c.dom.Element)public String getName()
public void setName(String name)
name - The namepublic String getNameQualifier()
public void setNameQualifier(String nameQualifier)
nameQualifier - The name qualifierpublic String getFormat()
public void setFormat(String format)
format - The name format URI
protected Element buildRoot(Document doc,
boolean xmlns)
SAMLObject
buildRoot in class SAMLObjectdoc - The document context to usexmlns - Include namespace(s) on root element?
SAMLObject.buildRoot(org.w3c.dom.Document,boolean)
public Node toDOM(Document doc,
boolean xmlns)
throws SAMLException
SAMLObject
toDOM in class SAMLObjectdoc - A Document object to use in manufacturing the treexmlns - Include namespace(s) on root element?
SAMLException - Raised if the object is incompletely definedSAMLObject.toDOM(org.w3c.dom.Document,boolean)
public void checkValidity()
throws SAMLException
SAMLObject
checkValidity in class SAMLObjectSAMLException - Raised if the serialized object would be invalid SAML,
excluding any embedded objectsSAMLObject.checkValidity()
public Object clone()
throws CloneNotSupportedException
clone in class SAMLObjectCloneNotSupportedExceptionObject.clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||