|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.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 Node |
root
Root node of a DOM tree capturing the object |
Constructor Summary | |
SAMLObject()
|
Method Summary | |
protected abstract Element |
buildRoot(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 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 |
protected static Element |
fromStream(InputStream in)
Allows parsing of objects from a stream of XML |
protected static Element |
fromStream(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 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 |
Node |
toDOM()
Transforms the object into a DOM tree without an existing document context, including namespace declarations |
Node |
toDOM(boolean xmlns)
Transforms the object into a DOM tree without an existing document context |
Node |
toDOM(Document doc)
Transforms the object into a DOM tree using an existing document context, including namespace declarations |
Node |
toDOM(Document doc,
boolean xmlns)
Transforms the object into a DOM tree using an existing document context |
void |
toStream(OutputStream out)
Serializes the XML representation of the SAML object to a stream |
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 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 bitprotected static Element fromStream(InputStream in) throws SAMLException
in
- A stream containing XML
SAMLException
- Raised if an exception occurs while constructing
the objectprotected static Element fromStream(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 Node plantRoot()
protected abstract Element buildRoot(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 objectspublic 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(Element e) throws SAMLException
e
- Root element of a DOM tree
SAMLException
- Raised if an exception occurs while constructing
the objectpublic void toStream(OutputStream out) throws IOException, SAMLException
out
- Stream to use for output
IOException
- Raised if an I/O problem is detected
SAMLException
- Raised if the object is incompletely definedpublic byte[] toBase64() throws IOException, SAMLException
IOException
- Raised if an I/O problem is detected
SAMLException
- Raised if the object is incompletely definedpublic Node toDOM(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 definedpublic Node toDOM(boolean xmlns) throws SAMLException
xmlns
- Include namespace(s) on root element?
SAMLException
- Raised if the object is incompletely definedpublic Node toDOM(Document doc) throws SAMLException
doc
- A Document object to use in manufacturing the tree
SAMLException
- Raised if the object is incompletely definedpublic Node toDOM() throws SAMLException
SAMLException
- Raised if the object is incompletely definedprotected Object clone() throws CloneNotSupportedException
CloneNotSupportedException
Object.clone()
public String toString()
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |