All Implemented Interfaces:
Cloneable, Serializable
All Known Implementing Classes:
BasicAttribute
In a directory, named objects can have associated with them attributes. The Attribute interface represents an attribute associated with a named object. An attribute contains 0 or more, possibly null, values. The attribute values can be ordered or unordered (see isOrdered()). If the values are unordered, no duplicates are allowed. If the values are ordered, duplicates are allowed.
The content and representation of an attribute and its values is defined by the attribute's schema. The schema contains information about the attribute's syntax and other properties about the attribute. See getAttributeDefinition() and getAttributeSyntaxDefinition() for details regarding how to get schema information about an attribute if the underlying directory service supports schemas.
Equality of two attributes is determined by the implementation class. A simple implementation can use Object.equals() to determine equality of attribute values, while a more sophisticated implementation might make use of schema information to determine equality. Similarly, one implementation might provide a static storage structure which simply returns the values passed to its constructor, while another implementation might define get() and getAll(). to get the values dynamically from the directory.
Note that updates to Attribute (such as adding or removing a value) do not affect the corresponding representation of the attribute in the directory. Updates to the directory can only be effected using operations in the DirContext interface.
Rosanna - LeeScott - Seligman1.3 - | Field Summary | ||
|---|---|---|
| static final long | serialVersionUID | Use serialVersionUID from JNDI 1.1.1 for interoperability. |
| Method from javax.naming.directory.Attribute Summary: |
|---|
| add, add, clear, clone, contains, get, get, getAll, getAttributeDefinition, getAttributeSyntaxDefinition, getID, isOrdered, remove, remove, set, size |
| Method from javax.naming.directory.Attribute Detail: |
|---|
Equality is determined by the implementation, which may use Object.equals() or schema information to determine equality. |
|
|
|
|
|
|
|
If an implementation does not support schemas, it should throw OperationNotSupportedException. If an implementation does support schemas, it should define this method to return the appropriate information. |
For example, even though a value might be a Java String object, its directory syntax might be "Printable String" or "Telephone Number". Or a value might be a byte array, and its directory syntax is "JPEG" or "Certificate". For example, if this attribute's syntax is "JPEG", this method would return the syntax definition for "JPEG". The information that you can retrieve from a syntax definition is directory-dependent. If an implementation does not support schemas, it should throw OperationNotSupportedException. If an implementation does support schemas, it should define this method to return the appropriate information. |
|
|
Equality is determined by the implementation, which may use Object.equals() or schema information to determine equality. |
|
|
|