|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nci.cagrid.opensaml.SAMLObject
gov.nih.nci.cagrid.opensaml.SAMLNameIdentifier
public class SAMLNameIdentifier
Represents a SAML Subject
| Field Summary | |
|---|---|
protected java.lang.String |
format
|
static java.lang.String |
FORMAT_EMAIL
Email Format Identifier |
static java.lang.String |
FORMAT_UNSPECIFIED
Unspecified Format Identifier |
static java.lang.String |
FORMAT_WINDOWS
Windows Domain Format Identifier |
static java.lang.String |
FORMAT_X509
X.509 Subject Format Identifier |
protected static java.util.Hashtable |
formatMap
Maps formats to Java class implementations |
protected java.lang.String |
name
|
protected java.lang.String |
nameQualifier
|
| Fields inherited from class gov.nih.nci.cagrid.opensaml.SAMLObject |
|---|
config, dirty, log, parentObject, root |
| Constructor Summary | |
|---|---|
SAMLNameIdentifier()
Default constructor |
|
SAMLNameIdentifier(org.w3c.dom.Element e)
Reconstructs a name identifier from a DOM tree |
|
SAMLNameIdentifier(java.io.InputStream in)
Reconstructs a name identifier from a stream |
|
SAMLNameIdentifier(java.lang.String name,
java.lang.String nameQualifier,
java.lang.String format)
Builds a name identifier out of its component parts |
|
| Method Summary | |
|---|---|
protected org.w3c.dom.Element |
buildRoot(org.w3c.dom.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. |
java.lang.Object |
clone()
Copies a SAML object such that no dependencies exist between the original and the copy |
void |
fromDOM(org.w3c.dom.Element e)
Initialization of an object from a DOM element |
java.lang.String |
getFormat()
Gets the format of the name |
static SAMLNameIdentifier |
getInstance(org.w3c.dom.Element e)
Locates an implementation class for a NameIdentifier based on Format and constructs it based on the DOM provided. |
static SAMLNameIdentifier |
getInstance(java.io.InputStream in)
Locates an implementation class for a NameIdentifier based on Format and constructs it based on the stream provided. |
static SAMLNameIdentifier |
getInstance(java.lang.String format)
Locates an implementation class for a NameIdentifier based on Format and constructs an empty instance. |
java.lang.String |
getName()
Gets the name of the Subject |
java.lang.String |
getNameQualifier()
Gets the name qualifier |
static void |
regFactory(java.lang.String format,
java.lang.String className)
Registers a class to handle a specific NameID format when parsing XML |
void |
setFormat(java.lang.String format)
Sets the format of the name |
void |
setName(java.lang.String name)
Sets the name of the Subject |
void |
setNameQualifier(java.lang.String nameQualifier)
Sets the name qualifier |
org.w3c.dom.Node |
toDOM(org.w3c.dom.Document doc,
boolean xmlns)
Transforms the object into a DOM tree using an existing document context |
static void |
unregFactory(java.lang.String format)
Unregisters a class to handle a specific NameID format when parsing XML |
| Methods inherited from class gov.nih.nci.cagrid.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 java.lang.String name
protected java.lang.String nameQualifier
protected java.lang.String format
protected static java.util.Hashtable formatMap
public static final java.lang.String FORMAT_UNSPECIFIED
public static final java.lang.String FORMAT_EMAIL
public static final java.lang.String FORMAT_X509
public static final java.lang.String FORMAT_WINDOWS
| Constructor Detail |
|---|
public SAMLNameIdentifier()
public SAMLNameIdentifier(java.lang.String name,
java.lang.String nameQualifier,
java.lang.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(org.w3c.dom.Element e)
throws SAMLException
e - The root of a DOM tree
SAMLException - Thrown if the object cannot be constructed
public SAMLNameIdentifier(java.io.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(java.lang.String format,
java.lang.String className)
format - The format URI to registerclassName - The Java class that handles this formatpublic static void unregFactory(java.lang.String format)
type - The format URI to unregister
public static SAMLNameIdentifier getInstance(org.w3c.dom.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(java.io.InputStream in)
throws SAMLException
in - The stream to deserialize from
SAMLException - Thrown if an error occurs while constructing the object
public static SAMLNameIdentifier getInstance(java.lang.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(org.w3c.dom.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 java.lang.String getName()
public void setName(java.lang.String name)
name - The namepublic java.lang.String getNameQualifier()
public void setNameQualifier(java.lang.String nameQualifier)
nameQualifier - The name qualifierpublic java.lang.String getFormat()
public void setFormat(java.lang.String format)
format - The name format URI
protected org.w3c.dom.Element buildRoot(org.w3c.dom.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 org.w3c.dom.Node toDOM(org.w3c.dom.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 java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class SAMLObjectjava.lang.CloneNotSupportedExceptionObject.clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||