Class LDAPEntry
- java.lang.Object
-
- com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPEntry
-
- All Implemented Interfaces:
java.io.Serializable
@NotExtensible @NotMutable @ThreadSafety(level=NOT_THREADSAFE) public class LDAPEntry extends java.lang.Object implements java.io.Serializable
This class provides a data structure that represents an LDAP entry.
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, theEntryclass should be used instead.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LDAPEntry()Creates a new LDAP entry with a zero-length DN and no attributes.LDAPEntry(Entry entry)Creates a new LDAP entry from the providedEntryobject.LDAPEntry(java.lang.String distinguishedName)Creates a new LDAP entry with the provided DN and no attributes.LDAPEntry(java.lang.String distinguishedName, LDAPAttributeSet attrs)Creates a new LDAP entry with the provided DN and attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPAttributegetAttribute(java.lang.String attrName)Retrieves the attribute with the specified name.LDAPAttributegetAttribute(java.lang.String attrName, java.lang.String lang)Retrieves the attribute with the specified base name and language subtype.LDAPAttributeSetgetAttributeSet()Retrieves the attributes for this entry.LDAPAttributeSetgetAttributeSet(java.lang.String subtype)Retrieves the set of attributes containing the specified subtype for this entry.java.lang.StringgetDN()Retrieves the distinguished name for this entry.EntrytoEntry()Retrieves anEntryobject that is the equivalent of this LDAP entry.java.lang.StringtoString()Retrieves a string representation of this LDAP entry.
-
-
-
Constructor Detail
-
LDAPEntry
public LDAPEntry()
Creates a new LDAP entry with a zero-length DN and no attributes.
-
LDAPEntry
public LDAPEntry(@NotNull java.lang.String distinguishedName)
Creates a new LDAP entry with the provided DN and no attributes.- Parameters:
distinguishedName- The DN to use for the entry.
-
LDAPEntry
public LDAPEntry(@NotNull java.lang.String distinguishedName, @Nullable LDAPAttributeSet attrs)
Creates a new LDAP entry with the provided DN and attributes.- Parameters:
distinguishedName- The DN to use for the entry.attrs- The attributes to use for the entry.
-
-
Method Detail
-
getDN
@NotNull public java.lang.String getDN()
Retrieves the distinguished name for this entry.- Returns:
- The distinguished name for this entry.
-
getAttributeSet
@NotNull public LDAPAttributeSet getAttributeSet()
Retrieves the attributes for this entry.- Returns:
- The attributes for this entry.
-
getAttributeSet
@NotNull public LDAPAttributeSet getAttributeSet(@NotNull java.lang.String subtype)
Retrieves the set of attributes containing the specified subtype for this entry.- Parameters:
subtype- The subtype for the attributes to retrieve.- Returns:
- The set of attributes containing the specified subtype.
-
getAttribute
@Nullable public LDAPAttribute getAttribute(@NotNull java.lang.String attrName)
Retrieves the attribute with the specified name.- Parameters:
attrName- The name of the attribute to retrieve.- Returns:
- The requested attribute, or
nullif there is none.
-
getAttribute
@Nullable public LDAPAttribute getAttribute(@NotNull java.lang.String attrName, @Nullable java.lang.String lang)
Retrieves the attribute with the specified base name and language subtype.- Parameters:
attrName- The base name of the attribute to retrieve.lang- The language subtype for the attribute to retrieve.- Returns:
- The requested attribute, or
nullif there is none.
-
toEntry
@NotNull public final Entry toEntry()
Retrieves anEntryobject that is the equivalent of this LDAP entry.- Returns:
- The
Entryobject that is the equivalent of this LDAP entry.
-
-