public class LdapEntry extends AbstractLdapBean
Modifier and Type | Field and Description |
---|---|
private Map<String,LdapAttribute> |
entryAttributes
Attributes contained in this bean.
|
private String |
entryDn
Distinguished name for this entry.
|
private static int |
HASH_CODE_SEED
hash code seed.
|
private static long |
serialVersionUID
serial version uid.
|
Constructor and Description |
---|
LdapEntry()
Default constructor.
|
LdapEntry(SortBehavior sb)
Creates a new ldap entry.
|
LdapEntry(String dn)
Creates a new ldap entry.
|
LdapEntry(String dn,
Collection<LdapAttribute> attrs)
Creates a new ldap entry.
|
LdapEntry(String dn,
LdapAttribute... attr)
Creates a new ldap entry.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(LdapAttribute... attr)
Adds an attribute to this ldap attributes.
|
void |
addAttributes(Collection<LdapAttribute> attrs)
Adds attribute(s) to this ldap attributes.
|
void |
clear()
Removes all the attributes in this ldap attributes.
|
static AttributeModification[] |
computeModifications(LdapEntry source,
LdapEntry target)
Returns the list of attribute modifications needed to change the supplied target entry into the supplied source
entry.
|
boolean |
equals(Object o) |
LdapAttribute |
getAttribute()
Returns a single attribute of this attributes.
|
LdapAttribute |
getAttribute(String name)
Returns the attribute with the supplied name.
|
String[] |
getAttributeNames()
Returns the attribute names in this entry.
|
Collection<LdapAttribute> |
getAttributes()
Returns a collection of ldap attribute.
|
String |
getDn()
Returns the DN.
|
int |
hashCode() |
void |
removeAttribute(LdapAttribute... attr)
Removes an attribute from this ldap attributes.
|
void |
removeAttribute(String name)
Removes the attribute of the supplied name from this ldap attributes.
|
void |
removeAttributes(Collection<LdapAttribute> attrs)
Removes the attribute(s) from this ldap attributes.
|
void |
renameAttribute(String oldName,
String newName)
Changes the name of an attribute in this entry.
|
void |
setDn(String dn)
Sets the DN.
|
int |
size()
Returns the number of attributes in this ldap attributes.
|
String |
toString() |
getSortBehavior
private static final int HASH_CODE_SEED
private static final long serialVersionUID
private String entryDn
private final Map<String,LdapAttribute> entryAttributes
public LdapEntry()
public LdapEntry(SortBehavior sb)
sb
- sort behaviorpublic LdapEntry(String dn)
dn
- dn for this entrypublic LdapEntry(String dn, LdapAttribute... attr)
dn
- dn for this entryattr
- ldap attribute for this entrypublic LdapEntry(String dn, Collection<LdapAttribute> attrs)
dn
- dn for this entryattrs
- collection of attributes to addpublic String getDn()
public void setDn(String dn)
dn
- dn to setpublic Collection<LdapAttribute> getAttributes()
public LdapAttribute getAttribute()
public LdapAttribute getAttribute(String name)
name
- of the attribute to returnpublic String[] getAttributeNames()
public void addAttribute(LdapAttribute... attr)
attr
- attribute to addpublic void addAttributes(Collection<LdapAttribute> attrs)
attrs
- collection of attributes to addpublic void removeAttribute(LdapAttribute... attr)
attr
- attribute to removepublic void removeAttribute(String name)
name
- of attribute to removepublic void removeAttributes(Collection<LdapAttribute> attrs)
attrs
- collection of ldap attributes to removepublic void renameAttribute(String oldName, String newName)
LdapAttribute.setName(String)
, and the attribute is added back to this entry. If oldName does not
exist, this method does nothing.oldName
- attribute name to change fromnewName
- attribute name to change topublic int size()
public void clear()
public static AttributeModification[] computeModifications(LdapEntry source, LdapEntry target)
source
- ldap entry containing new datatarget
- ldap entry containing existing dataCopyright © 2003-2019 Virginia Tech. All Rights Reserved.