|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.entry.AttributeUtils
public final class AttributeUtils
A set of utility fuctions for working with Attributes.
| Constructor Summary | |
|---|---|
AttributeUtils()
|
|
| Method Summary | |
|---|---|
static void |
applyModification(Entry entry,
Modification modification)
A method to apply a modification to an existing entry. |
static boolean |
containsValueCaseIgnore(Attribute attr,
Object value)
Check if an attribute contains a value. |
static String |
parseAttribute(byte[] str,
org.apache.directory.api.util.Position pos,
boolean withOption)
Parse an attribute. |
static Attribute |
toApiAttribute(Attribute jndiAttribute)
Convert a JNDI Attribute to an LDAP API Attribute |
static Attributes |
toAttributes(Entry entry)
Converts an Entry to an Attributes. |
static Attributes |
toCaseInsensitive(Attributes attributes)
Check if the attributes is a BasicAttributes, and if so, switch the case sensitivity to false to avoid tricky problems in the server. |
static Entry |
toEntry(Attributes attributes,
Dn dn)
Convert a BasicAttributes or a AttributesImpl to an Entry |
static Attribute |
toJndiAttribute(Attribute attribute)
Converts an Attribute to a JNDI Attribute. |
| 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 boolean containsValueCaseIgnore(Attribute attr,
Object value)
attr - The attribute to checkvalue - The value to look for
public static Attributes toCaseInsensitive(Attributes attributes)
attributes - The Attributes to check
public static String parseAttribute(byte[] str,
org.apache.directory.api.util.Position pos,
boolean withOption)
throws ParseException
str - The parsed attribute,pos - The position of the attribute in the current string
ParseException
public static void applyModification(Entry entry,
Modification modification)
throws LdapException
entry - The entry on which we want to apply a modificationmodification - the Modification to be applied
LdapException - if some operation fails.
public static Entry toEntry(Attributes attributes,
Dn dn)
throws LdapException
attributes - the BasicAttributes or AttributesImpl instance to convertdn - The Dn which is needed by the Entry
LdapException - If we get an invalid attributepublic static Attributes toAttributes(Entry entry)
Entry to an Attributes.
entry - the Entry to convert
Attributespublic static Attribute toJndiAttribute(Attribute attribute)
Attribute to a JNDI Attribute.
attribute - the Attribute to convert
public static Attribute toApiAttribute(Attribute jndiAttribute)
throws LdapInvalidAttributeValueException
jndiAttribute - the JNDI Attribute instance to convert
LdapInvalidAttributeValueException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||