Interface Entry
-
- All Known Subinterfaces:
UpdatableEntry
@NotExtensible @ThreadSafety(level=INTERFACE_NOT_THREADSAFE) public interface Entry
This interface defines a set of methods which may be used to interact with an entry.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Attribute>
getAttribute(AttributeType type)
Retrieves the attribute with the specified name.Attribute
getAttribute(AttributeType type, java.util.Set<java.lang.String> options)
Retrieves the attribute with the specified name and exact set of options.java.util.List<Attribute>
getAttribute(java.lang.String name)
Retrieves the attribute with the specified name.Attribute
getAttribute(java.lang.String name, java.util.Set<java.lang.String> options)
Retrieves the attribute with the specified name and exact set of options.java.util.List<Attribute>
getAttributes()
Retrieves a list of the attributes contained in the entry.java.lang.String
getDN()
Retrieves the DN of the entry as a string.DN
getParsedDN()
Retrieves a parsed representation of the DN for the entry.java.util.List<Attribute>
getRealAttributes()
Retrieves a list of the real (i.e., non-virtual) attributes contained in the entry.java.util.List<Attribute>
getVirtualAttributes()
Retrieves a list of the virtual attributes contained in the entry.boolean
hasAttribute(AttributeType type)
Indicates whether the entry contains an attribute with the specified type.boolean
hasAttribute(AttributeType type, java.util.Set<java.lang.String> options)
Indicates whether the entry contains an attribute with the specified name and set of options.boolean
hasAttribute(java.lang.String name)
Indicates whether the entry contains an attribute with the specified name.boolean
hasAttribute(java.lang.String name, java.util.Set<java.lang.String> options)
Indicates whether the entry contains an attribute with the specified name and set of options.boolean
hasAttributeValue(AttributeType type, byte[] value)
Indicates whether the entry contains an attribute with the specified name and value.boolean
hasAttributeValue(AttributeType type, java.lang.String value)
Indicates whether the entry contains an attribute with the specified name and value.boolean
hasAttributeValue(java.lang.String name, byte[] value)
Indicates whether the entry contains an attribute with the specified name and value.boolean
hasAttributeValue(java.lang.String name, java.lang.String value)
Indicates whether the entry contains an attribute with the specified name and value.boolean
matchesBaseAndScope(java.lang.String baseDN, SearchScope scope)
Indicates whether this entry is within the range of the provided base DN and scope.boolean
matchesFilter(Filter filter)
Indicates whether this entry matches the provided filter.boolean
matchesFilter(java.lang.String filter)
Indicates whether this entry matches the provided filter.ReadOnlyEntry
toLDAPSDKEntry()
Converts this server entry to its corresponding LDAP SDK representation.
-
-
-
Method Detail
-
getDN
java.lang.String getDN()
Retrieves the DN of the entry as a string.- Returns:
- The DN of the entry as a string.
-
getParsedDN
DN getParsedDN() throws LDAPException
Retrieves a parsed representation of the DN for the entry.- Returns:
- A parsed representation of the DN for the entry.
- Throws:
LDAPException
- If a problem occurs while trying to parse the DN.
-
getAttributes
java.util.List<Attribute> getAttributes()
Retrieves a list of the attributes contained in the entry. It may contain both real and virtual attributes.- Returns:
- A list of the attributes contained in the entry.
-
getRealAttributes
java.util.List<Attribute> getRealAttributes()
Retrieves a list of the real (i.e., non-virtual) attributes contained in the entry.- Returns:
- A list of the real attributes contained in the entry.
-
getVirtualAttributes
java.util.List<Attribute> getVirtualAttributes()
Retrieves a list of the virtual attributes contained in the entry.- Returns:
- A list of the virtual attributes contained in the entry.
-
hasAttribute
boolean hasAttribute(AttributeType type)
Indicates whether the entry contains an attribute with the specified type.- Parameters:
type
- The attribute type for which to make the determination. It must not benull
.- Returns:
true
if the entry has an attribute with the specified name, orfalse
if not.
-
hasAttribute
boolean hasAttribute(java.lang.String name)
Indicates whether the entry contains an attribute with the specified name.- Parameters:
name
- The name or OID of the attribute for which to make the determination. It must not benull
.- Returns:
true
if the entry has an attribute with the specified name, orfalse
if not.
-
hasAttribute
boolean hasAttribute(AttributeType type, java.util.Set<java.lang.String> options)
Indicates whether the entry contains an attribute with the specified name and set of options.- Parameters:
type
- The attribute type for which to make the determination. It must not benull
.options
- The set of attribute options for which to make the determination. It may benull
or empty to indicate no options.- Returns:
true
if the entry has an attribute with the specified name, orfalse
if not.
-
hasAttribute
boolean hasAttribute(java.lang.String name, java.util.Set<java.lang.String> options)
Indicates whether the entry contains an attribute with the specified name and set of options.- Parameters:
name
- The name or OID of the attribute for which to make the determination. It must not benull
.options
- The set of attribute options for which to make the determination. It may benull
or empty to indicate no options.- Returns:
true
if the entry has an attribute with the specified name, orfalse
if not.
-
hasAttributeValue
boolean hasAttributeValue(AttributeType type, java.lang.String value)
Indicates whether the entry contains an attribute with the specified name and value.- Parameters:
type
- The attribute type for the attribute for which to make the determination. It must not benull
.value
- The value for which to make the determination. It must not benull
.- Returns:
true
if the entry has an attribute with the specified name and value, orfalse
if not.
-
hasAttributeValue
boolean hasAttributeValue(java.lang.String name, java.lang.String value)
Indicates whether the entry contains an attribute with the specified name and value.- Parameters:
name
- The name or OID of the attribute for which to make the determination. It must not benull
.value
- The value for which to make the determination. It must not benull
.- Returns:
true
if the entry has an attribute with the specified name and value, orfalse
if not.
-
hasAttributeValue
boolean hasAttributeValue(AttributeType type, byte[] value)
Indicates whether the entry contains an attribute with the specified name and value.- Parameters:
type
- The attribute type for the attribute for which to make the determination. It must not benull
.value
- The value for which to make the determination. It must not benull
.- Returns:
true
if the entry has an attribute with the specified name and value, orfalse
if not.
-
hasAttributeValue
boolean hasAttributeValue(java.lang.String name, byte[] value)
Indicates whether the entry contains an attribute with the specified name and value.- Parameters:
name
- The name or OID of the attribute for which to make the determination. It must not benull
.value
- The value for which to make the determination. It must not benull
.- Returns:
true
if the entry has an attribute with the specified name and value, orfalse
if not.
-
getAttribute
java.util.List<Attribute> getAttribute(AttributeType type)
Retrieves the attribute with the specified name. This will include all variants of the attribute type with different sets of attribute options.- Parameters:
type
- The attribute type for the attribute to retrieve. It must not benull
.- Returns:
- A list of all occurrences of the requested attribute with any set
of options, or
null
if the specified attribute is not present in the entry.
-
getAttribute
java.util.List<Attribute> getAttribute(java.lang.String name)
Retrieves the attribute with the specified name. This will include all variants of the attribute type with different sets of attribute options.- Parameters:
name
- The name or OID of the attribute to retrieve. It must not benull
.- Returns:
- A list of all occurrences of the requested attribute with any set
of options, or
null
if the specified attribute is not present in the entry.
-
getAttribute
Attribute getAttribute(AttributeType type, java.util.Set<java.lang.String> options)
Retrieves the attribute with the specified name and exact set of options.- Parameters:
type
- The attribute type for the attribute to retrieve. It must not benull
.options
- The set of attribute options for the attribute to retrieve. It may benull
or empty if there should not be any options.- Returns:
- The requested attribute, or
null
if it is not present in the entry.
-
getAttribute
Attribute getAttribute(java.lang.String name, java.util.Set<java.lang.String> options)
Retrieves the attribute with the specified name and exact set of options.- Parameters:
name
- The name or OID of the attribute to retrieve. It must not benull
.options
- The set of attribute options for the attribute to retrieve. It may benull
or empty if there should not be any options.- Returns:
- The requested attribute, or
null
if it is not present in the entry.
-
matchesBaseAndScope
boolean matchesBaseAndScope(java.lang.String baseDN, SearchScope scope) throws LDAPException
Indicates whether this entry is within the range of the provided base DN and scope.- Parameters:
baseDN
- The base DN for which to make the determination.scope
- The scope for which to make the determination.- Returns:
true
if this entry is within the range specified by the provided base DN and scope, orfalse
if not.- Throws:
LDAPException
- If the provided string cannot be parsed as a valid DN.
-
matchesFilter
boolean matchesFilter(java.lang.String filter) throws LDAPException
Indicates whether this entry matches the provided filter.- Parameters:
filter
- The filter for which to make the determination. It must not benull
.- Returns:
true
if this entry matches the provided filter, orfalse
if not.- Throws:
LDAPException
- If a problem occurs while making the determination, or if the provided string cannot be parsed as a valid filter.
-
matchesFilter
boolean matchesFilter(Filter filter) throws LDAPException
Indicates whether this entry matches the provided filter.- Parameters:
filter
- The filter for which to make the determination. It must not benull
.- Returns:
true
if this entry matches the provided filter, orfalse
if not.- Throws:
LDAPException
- If a problem occurs while making the determination, or if the provided string cannot be parsed as a valid filter.
-
toLDAPSDKEntry
ReadOnlyEntry toLDAPSDKEntry()
Converts this server entry to its corresponding LDAP SDK representation.- Returns:
- An LDAP SDK representation of this server entry.
-
-