Interface LDAPEntry
-
public interface LDAPEntry
Represents a data structure for holding information about an LDAP entry.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterator<LDAPAttribute>
attributesIterator()
Returns an iterator over the set of attributes in the entry.Iterator<LDAPAttribute>
attributesIterator(String baseName, Set<String> options)
Returns an iterator over the set of attributes with the given base name and all of the specified options.LDAPAttribute
getAttribute(String attrName)
In an entry, returns the single attribute that exactly matches the specified attribute name.String
getDN()
Returns the distinguished name of the current entry.boolean
hasAttribute(String attrName)
Reports whether this entry contains the specified attribute.boolean
hasAttributeValue(String attrName, byte[] value)
Reports whether this entry contains an attribute with the given name and value.boolean
hasAttributeValue(String attrName, String value)
Reports whether this entry contains an attribute with the given name and value.String
toString()
Retrieves the string representation of the entry's distinguished name (DN) and its attributes.
-
-
-
Method Detail
-
hasAttribute
boolean hasAttribute(String attrName)
Reports whether this entry contains the specified attribute.- Parameters:
attrName
- the name of the attribute for which to make the check. It must not be null.- Returns:
- true if the entry contains the specified attribute, or false if not.
-
hasAttributeValue
boolean hasAttributeValue(String attrName, byte[] value)
Reports whether this entry contains an attribute with the given name and value.- Parameters:
attrName
- the name of the attribute for which to make the check. It must not be null.value
- the value for which to make the check. It must not be null.- Returns:
- true if the entry contains an attribute with the specified name and value, or false if not.
-
hasAttributeValue
boolean hasAttributeValue(String attrName, String value)
Reports whether this entry contains an attribute with the given name and value.- Parameters:
attrName
- the name of the attribute for which to make the check. It must not be null.value
- the value for which to make the check. It must not be null.- Returns:
- true if the entry contains an attribute with the specified name and value, or false if not.
-
getAttribute
LDAPAttribute getAttribute(String attrName)
In an entry, returns the single attribute that exactly matches the specified attribute name.- Parameters:
attrName
- the name of attribute to return. It must not be null.- Returns:
- the attribute in the current entry that has exactly the same name, or null (if no attribute in the entry matches the specified name).
- See Also:
LDAPAttribute
-
attributesIterator
Iterator<LDAPAttribute> attributesIterator()
Returns an iterator over the set of attributes in the entry.- Returns:
- an iterator over the set of attributes in the entry.
- See Also:
LDAPAttribute
-
attributesIterator
Iterator<LDAPAttribute> attributesIterator(String baseName, Set<String> options)
Returns an iterator over the set of attributes with the given base name and all of the specified options.- Parameters:
baseName
- the base name (without any options) for the attribute to return. It must not be null.options
- the set of options that should be included in the attributes that are returned.- Returns:
- an iterator over the set of attributes with the given base name and all of the specified options.
- See Also:
LDAPAttribute
-
getDN
String getDN()
Returns the distinguished name of the current entry.- Returns:
- the distinguished name of the current entry.
-
-