|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.naming.directory.BasicAttribute
|
+--com.ca.commons.naming.DXAttribute
This is largely a schema-aware wrapper to BasicAttribute, with some utility classes spliced on.
| Field Summary |
| Fields inherited from class javax.naming.directory.BasicAttribute |
attrID, ordered, values |
| Fields inherited from interface javax.naming.directory.Attribute |
serialVersionUID |
| Constructor Summary | |
DXAttribute(javax.naming.directory.Attribute att)
Make a copy of a normal, pre-existing attribute. |
|
DXAttribute(java.lang.String ID)
Normal constructor for an Attribute with no (current) value. |
|
DXAttribute(java.lang.String ID,
javax.naming.NamingEnumeration values)
|
|
DXAttribute(java.lang.String ID,
java.lang.Object value)
Normal constructor an Attribute with a single value. |
|
| Method Summary | |
void |
addValues(javax.naming.NamingEnumeration values)
|
boolean |
checkIsBinaryInSchema()
|
boolean |
checkKnownBinaryAttributes(java.lang.String ID)
|
javax.naming.directory.DirContext |
getAttributeDefinition()
implements the interface spec. |
javax.naming.directory.DirContext |
getAttributeSyntaxDefinition()
implements the interface spec. |
java.lang.String |
getDescription()
Returns the attribute's 'DESC' field from the attribute schema definition, if such exists (it's an extension). |
java.lang.String |
getID()
|
java.lang.String |
getName()
|
java.lang.String[] |
getOptions()
IF a description field has been set in the schema, and IF that description field LISTs a set of values, read 'em and return them as a string array. |
javax.naming.directory.DirContext |
getSchema()
Utility method - returns the schema context in use by this attribute. |
java.lang.String |
getSyntaxDesc()
Returns (and caches) the syntax description. |
java.lang.String |
getSyntaxOID()
|
java.lang.Object[] |
getValues()
This method gets all the values of an attribute. |
boolean |
hasOptions()
|
boolean |
isBinary()
Whether the attribute contains binary data; ideally found by checking Syntax, but often set by inspection of the attribute value (whether it is a Byte array). |
static boolean |
isBinarySyntax(java.lang.String syntaxName)
|
static boolean |
isEmpty(javax.naming.directory.Attribute att)
Does this attribute have a valid value (i.e. not null, or empty string). |
java.lang.String |
schemaLookup(java.lang.String schemaEntry,
java.lang.String schemaAttribute)
Utility Function: takes a schema Entry class such as 'AttributeDefinition/cn', * and returns the result of looking up a particular attribute within that (e.g. |
void |
setBinary(boolean bin)
Sets the binary status of the attribute. |
void |
setBinaryness()
This method examines the schema to test whether the attribute is 'binary' data. |
static void |
setDefaultSchema(javax.naming.directory.DirContext defaultSchema)
This sets the standard schema to use while this connection is open. |
void |
setName(java.lang.String newName)
Usefull escape to allow renaming of attributes. |
void |
setOrdered(boolean state)
|
void |
setVerboseBinary(boolean status)
|
java.lang.String |
toString()
General descriptive string: used mainly for debugging... |
void |
trim()
Gets rid of null values and empty strings from the value set. |
java.lang.String |
unEscape(java.lang.String escapeMe)
|
| Methods inherited from class javax.naming.directory.BasicAttribute |
add, add, clear, clone, contains, equals, get, get, getAll, hashCode, isOrdered, remove, remove, set, size |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DXAttribute(java.lang.String ID)
public DXAttribute(java.lang.String ID,
java.lang.Object value)
public DXAttribute(javax.naming.directory.Attribute att)
att - the attribute (e.g. BasicAttribute) to wrap.
public DXAttribute(java.lang.String ID,
javax.naming.NamingEnumeration values)
| Method Detail |
public void addValues(javax.naming.NamingEnumeration values)
public static void setDefaultSchema(javax.naming.directory.DirContext defaultSchema)
public void setBinaryness()
public static boolean isEmpty(javax.naming.directory.Attribute att)
public javax.naming.directory.DirContext getSchema()
public javax.naming.directory.DirContext getAttributeDefinition()
getAttributeDefinition in interface javax.naming.directory.AttributegetAttributeDefinition in class javax.naming.directory.BasicAttributepublic boolean checkKnownBinaryAttributes(java.lang.String ID)
public static boolean isBinarySyntax(java.lang.String syntaxName)
public boolean checkIsBinaryInSchema()
public javax.naming.directory.DirContext getAttributeSyntaxDefinition()
getAttributeSyntaxDefinition in interface javax.naming.directory.AttributegetAttributeSyntaxDefinition in class javax.naming.directory.BasicAttributepublic boolean isBinary()
public void setBinary(boolean bin)
public java.lang.String schemaLookup(java.lang.String schemaEntry,
java.lang.String schemaAttribute)
schemaEntry - the full schema entry name to lookup, e.g. 'ClassDefinition/alias'schemaAttribute - the attribute to look up, e.g. 'MUST'
public boolean hasOptions()
public java.lang.String[] getOptions()
public java.lang.String unEscape(java.lang.String escapeMe)
public java.lang.String getSyntaxOID()
public void setName(java.lang.String newName)
public java.lang.String getName()
public java.lang.String getSyntaxDesc()
public java.lang.String getDescription()
public java.lang.String toString()
toString in class javax.naming.directory.BasicAttributepublic void setVerboseBinary(boolean status)
public java.lang.String getID()
getID in interface javax.naming.directory.AttributegetID in class javax.naming.directory.BasicAttributepublic java.lang.Object[] getValues()
public void trim()
public void setOrdered(boolean state)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||