|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nci.cagrid.opensaml.SAMLObject
public abstract class SAMLObject
Abstract base class for all SAML constructs
| Field Summary | |
|---|---|
protected SAMLConfig |
config
OpenSAML configuration |
protected boolean |
dirty
Dirty bit triggers recreation of DOM |
protected org.apache.log4j.Logger |
log
Class-specific logging object |
protected SAMLObject |
parentObject
Back pointer to SAML "parent" to allow back-walking and prevent double-containment |
protected org.w3c.dom.Node |
root
Root node of a DOM tree capturing the object |
| Constructor Summary | |
|---|---|
SAMLObject()
|
|
| Method Summary | |
|---|---|
protected abstract 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. |
abstract void |
checkValidity()
Evaluates the object's content to see if it is currently valid if serialized. |
protected 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 |
protected static org.w3c.dom.Element |
fromStream(java.io.InputStream in)
Allows parsing of objects from a stream of XML |
protected static org.w3c.dom.Element |
fromStream(java.io.InputStream in,
int minor)
Allows parsing of objects of a particular minor version from a stream of XML |
SAMLObject |
getParent()
Returns the containing object, if any. |
protected org.w3c.dom.Node |
plantRoot()
Installs the root node of this DOM as the document element |
protected void |
setDirty(boolean flag)
Sets or clears the object's dirty bit. |
SAMLObject |
setParent(SAMLObject parent)
Informs the object that it is being inserted into a composite structure, allowing it to check for existing containment and throw an exception, preventing unexplained errors due to multiple object containment. |
byte[] |
toBase64()
Returns a base64-encoded XML representation of the SAML object |
org.w3c.dom.Node |
toDOM()
Transforms the object into a DOM tree without an existing document context, including namespace declarations |
org.w3c.dom.Node |
toDOM(boolean xmlns)
Transforms the object into a DOM tree without an existing document context |
org.w3c.dom.Node |
toDOM(org.w3c.dom.Document doc)
Transforms the object into a DOM tree using an existing document context, including namespace declarations |
org.w3c.dom.Node |
toDOM(org.w3c.dom.Document doc,
boolean xmlns)
Transforms the object into a DOM tree using an existing document context |
void |
toStream(java.io.OutputStream out)
Serializes the XML representation of the SAML object to a stream |
java.lang.String |
toString()
Serializes a SAML object to a string in exclusive canonical form. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected SAMLConfig config
protected org.w3c.dom.Node root
protected org.apache.log4j.Logger log
protected SAMLObject parentObject
protected boolean dirty
| Constructor Detail |
|---|
public SAMLObject()
| Method Detail |
|---|
protected void setDirty(boolean flag)
flag - The new value of the dirty bit
protected static org.w3c.dom.Element fromStream(java.io.InputStream in)
throws SAMLException
in - A stream containing XML
SAMLException - Raised if an exception occurs while constructing
the object
protected static org.w3c.dom.Element fromStream(java.io.InputStream in,
int minor)
throws SAMLException
in - A stream containing XMLminor - The minor version of the incoming object
SAMLException - Raised if an exception occurs while constructing
the objectprotected org.w3c.dom.Node plantRoot()
protected abstract org.w3c.dom.Element buildRoot(org.w3c.dom.Document doc,
boolean xmlns)
doc - The document context to usexmlns - Include namespace(s) on root element?
public abstract void checkValidity()
throws SAMLException
SAMLException - Raised if the serialized object would be invalid SAML,
excluding any embedded objects
public SAMLObject setParent(SAMLObject parent)
throws SAMLException
parent - The object into which this object is being inserted
SAMLException - Raised if this object already has a parentpublic SAMLObject getParent()
public void fromDOM(org.w3c.dom.Element e)
throws SAMLException
e - Root element of a DOM tree
SAMLException - Raised if an exception occurs while constructing
the object
public void toStream(java.io.OutputStream out)
throws java.io.IOException,
SAMLException
out - Stream to use for output
java.io.IOException - Raised if an I/O problem is detected
SAMLException - Raised if the object is incompletely defined
public byte[] toBase64()
throws java.io.IOException,
SAMLException
java.io.IOException - Raised if an I/O problem is detected
SAMLException - Raised if the object is incompletely defined
public org.w3c.dom.Node toDOM(org.w3c.dom.Document doc,
boolean xmlns)
throws SAMLException
doc - A Document object to use in manufacturing the treexmlns - Include namespace(s) on root element?
SAMLException - Raised if the object is incompletely defined
public org.w3c.dom.Node toDOM(boolean xmlns)
throws SAMLException
xmlns - Include namespace(s) on root element?
SAMLException - Raised if the object is incompletely defined
public org.w3c.dom.Node toDOM(org.w3c.dom.Document doc)
throws SAMLException
doc - A Document object to use in manufacturing the tree
SAMLException - Raised if the object is incompletely defined
public org.w3c.dom.Node toDOM()
throws SAMLException
SAMLException - Raised if the object is incompletely defined
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionObject.clone()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||