|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.util.AttributeUtils
public class AttributeUtils
A set of utility fuctions for working with Attributes.
| Constructor Summary | |
|---|---|
AttributeUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
cloneValue(java.lang.Object value)
Clone the value. |
static boolean |
containsAnyValues(javax.naming.directory.Attribute attr,
java.lang.Object[] compared,
AttributeType type)
|
static boolean |
containsValue(javax.naming.directory.Attribute attr,
java.lang.Object compared,
AttributeType type)
|
static boolean |
containsValueCaseIgnore(javax.naming.directory.Attribute attr,
java.lang.Object value)
Check if an attribute contains a value. |
static boolean |
equals(java.lang.Object value1,
java.lang.Object value2)
Compare two values and return true if they are equal. |
static javax.naming.directory.Attribute |
getAttribute(javax.naming.directory.Attributes attrs,
AttributeType type)
Utility method to extract an attribute from Attributes object using all combinationos of the name including aliases. |
static javax.naming.directory.Attribute |
getAttribute(ModificationItemImpl[] mods,
AttributeType type)
Utility method to extract an attribute from an array of modifications. |
static javax.naming.directory.Attribute |
getDifference(javax.naming.directory.Attribute attr0,
javax.naming.directory.Attribute attr1)
Creates a new attribute which contains the values representing the difference of two attributes. |
static javax.naming.directory.Attribute |
getUnion(javax.naming.directory.Attribute attr0,
javax.naming.directory.Attribute attr1)
Creates a new attribute which contains the values representing the union of two attributes. |
static javax.naming.directory.Attribute |
toAttributeImpl(javax.naming.directory.Attribute attribute)
Switch from a BasicAttribute to a LockableAttributeImpl. |
static javax.naming.directory.Attributes |
toAttributesImpl(javax.naming.directory.Attributes attributes)
Switch from a BasicAttributes to a LockableAttributesImpl. |
static java.lang.String |
toString(javax.naming.directory.Attribute attribute)
Return a string representing the attributes |
static java.lang.String |
toString(javax.naming.directory.Attributes attributes)
Return a string representing the attributes |
static java.lang.String |
toString(java.lang.String tabs,
javax.naming.directory.Attribute attribute)
Return a string representing the attributes with tabs in front of the string |
static java.lang.String |
toString(java.lang.String tabs,
javax.naming.directory.Attributes attributes)
Return a string representing the attributes with tabs in front of the string |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeUtils()
| Method Detail |
|---|
public static final boolean equals(java.lang.Object value1,
java.lang.Object value2)
value1 - The first valuevalue2 - The second value
public static final java.lang.Object cloneValue(java.lang.Object value)
value - The value to clone
public static final javax.naming.directory.Attribute toAttributeImpl(javax.naming.directory.Attribute attribute)
attribute - The attribute to transform
public static final javax.naming.directory.Attributes toAttributesImpl(javax.naming.directory.Attributes attributes)
attributes - The attributes to transform
public static final javax.naming.directory.Attribute getAttribute(javax.naming.directory.Attributes attrs,
AttributeType type)
attrs - the Attributes to get the Attribute object fromtype - the attribute type specification
public static final javax.naming.directory.Attribute getAttribute(ModificationItemImpl[] mods,
AttributeType type)
mods - the array of ModificationItems to extract the Attribute from.type - the attributeType spec of the Attribute to extract
public static final boolean containsValue(javax.naming.directory.Attribute attr,
java.lang.Object compared,
AttributeType type)
throws javax.naming.NamingException
javax.naming.NamingException
public static final boolean containsValueCaseIgnore(javax.naming.directory.Attribute attr,
java.lang.Object value)
attr - The attribute to checkvalue - The value to look for
javax.naming.NamingException
public static boolean containsAnyValues(javax.naming.directory.Attribute attr,
java.lang.Object[] compared,
AttributeType type)
throws javax.naming.NamingException
javax.naming.NamingException
public static javax.naming.directory.Attribute getDifference(javax.naming.directory.Attribute attr0,
javax.naming.directory.Attribute attr1)
throws javax.naming.NamingException
IllegalArgumentException is
raised. Note that the order of arguments makes a difference.
attr0 - the first attributeattr1 - the second attribute
javax.naming.NamingException - if there are problems accessing attribute values
public static javax.naming.directory.Attribute getUnion(javax.naming.directory.Attribute attr0,
javax.naming.directory.Attribute attr1)
throws javax.naming.NamingException
IllegalArgumentException
is raised.
attr0 - the first attributeattr1 - the second attribute
javax.naming.NamingException - if there are problems accessing attribute values
public static java.lang.String toString(java.lang.String tabs,
javax.naming.directory.Attribute attribute)
tabs - Spaces to be added before the stringattributes - The attributes to print
public static java.lang.String toString(javax.naming.directory.Attribute attribute)
attributes - The attributes to print
public static java.lang.String toString(java.lang.String tabs,
javax.naming.directory.Attributes attributes)
tabs - Spaces to be added before the stringattributes - The attributes to print
public static java.lang.String toString(javax.naming.directory.Attributes attributes)
attributes - The attributes to print
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||