|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.opensaml.SAMLObject
|
+--org.opensaml.SAMLAttribute
Basic SAML Attribute implementation that handles rudimentary attribute value types
| Field Summary | |
protected long |
lifetime
Effective lifetime of attribute's value(s) in seconds (0 means infinite) |
protected java.lang.String |
name
Name of attribute |
protected java.lang.String |
namespace
Namespace/qualifier of attribute |
protected QName |
type
The schema type of attribute value(s) |
protected java.util.ArrayList |
values
An array of attribute values |
| Fields inherited from class org.opensaml.SAMLObject |
config, log, root |
| Constructor Summary | |
SAMLAttribute(org.w3c.dom.Element e)
Reconstructs an attribute from a DOM tree |
|
SAMLAttribute(java.io.InputStream in)
Reconstructs an attribute from a stream |
|
SAMLAttribute(java.lang.String name,
java.lang.String namespace,
QName type,
long lifetime,
java.util.Collection values)
Builds an Attribute out of its component parts |
|
| Method Summary | |
boolean |
accept(org.w3c.dom.Element e)
Attribute acceptance hook used while consuming attributes from an assertion. |
boolean |
addValue(org.w3c.dom.Element e)
Adds a value to the state of the SAML Attribute |
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 attribute from a DOM element. |
long |
getLifetime()
Gets the value's lifetime, in seconds |
java.lang.String |
getName()
Gets the AttributeName attribute of the SAML Attribute |
java.lang.String |
getNamespace()
Gets the AttributeNamespace attribute of the SAML Attribute |
QName |
getType()
Gets the value of the xsi:type attribute, if any, of the SAML Attribute |
java.util.Iterator |
getValues()
Gets the values of the SAML Attribute |
org.w3c.dom.Node |
toDOM(org.w3c.dom.Document doc)
Overridden method to return a DOM tree representing the attribute |
| Methods inherited from class org.opensaml.SAMLObject |
fromStream, plantRoot, toBase64, 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 namespace
protected QName type
protected long lifetime
protected java.util.ArrayList values
| Constructor Detail |
public SAMLAttribute(java.lang.String name,
java.lang.String namespace,
QName type,
long lifetime,
java.util.Collection values)
throws SAMLException
name - Name of attributenamespace - Namespace/qualifier of attributetype - The schema type of attribute value(s)lifetime - Effective lifetime of attribute's value(s) in
seconds (0 means infinite)values - An array of attribute values
SAMLException - Thrown if attribute cannot be built from the
supplied information
public SAMLAttribute(org.w3c.dom.Element e)
throws SAMLException
e - The root of a DOM tree
SAMLException - Thrown if the object cannot be constructed
public SAMLAttribute(java.io.InputStream in)
throws SAMLException
in - A stream containing XML
SAMLException - Raised if an exception occurs while constructing
the object.| Method Detail |
public void fromDOM(org.w3c.dom.Element e)
throws SAMLException
Checks the attribute's syntactic validity. An exception is thrown if any problems are detected. The exception will contain a message describing the problem, and may wrap another exception.
Because attributes are generalized, this base method only handles simple attributes whose values are of uniform schema type and expressed in the DOM as a single text node within the AttributeValue element(s). The attribute's schema type is set by the first xsi:type attribute found in the value list, if any.
SAML applications should override this class and reimplement this method to handle other requirements.
fromDOM in class SAMLObjecte - Root element of a DOM tree
SAMLException - Raised if an exception occurs while constructing
the object.public java.lang.String getName()
public java.lang.String getNamespace()
public QName getType()
public long getLifetime()
public java.util.Iterator getValues()
public boolean accept(org.w3c.dom.Element e)
e - An AttributeValue element to check
public boolean addValue(org.w3c.dom.Element e)
The base class only supports a simple text node content model.
e - The AttributeValue element containing the value to add
public org.w3c.dom.Node toDOM(org.w3c.dom.Document doc)
Because attributes are generalized, this base method only handles simple attributes whose values are of uniform simple type and expressed in the DOM as a single text node within the AttributeValue element(s). The values are serialized using the toString() method.
SAML applications should override this class and reimplement or supplement this method to handle other requirements.
toDOM in class SAMLObjectdoc - A Document object to use in manufacturing the tree
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 | ||||||||