T
- type of backing mappublic abstract class AbstractLdapAttributes<T extends Map<String,LdapAttribute>> extends AbstractLdapBean implements LdapAttributes
AbstractLdapAttributes
provides a base implementation of
LdapAttributes
where the underlying attributes are backed by a
Map
.Modifier and Type | Field and Description |
---|---|
protected T |
attributes
Attributes contained in this bean.
|
static boolean |
DEFAULT_IGNORE_CASE
Whether to ignore case when creating
BasicAttributes . |
protected static int |
HASH_CODE_SEED
hash code seed.
|
beanFactory, logger
Constructor and Description |
---|
AbstractLdapAttributes(LdapBeanFactory lbf)
Creates a new
AbstractLdapAttributes with the supplied ldap
bean factory. |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(LdapAttribute a)
This adds a new attribute to this
LdapAttributes . |
void |
addAttribute(String name,
List<?> values)
This adds a new attribute to this
LdapAttributes with the
supplied name and values. |
void |
addAttribute(String name,
Object value)
This adds a new attribute to this
LdapAttributes with the
supplied name and value. |
void |
addAttributes(Attributes a)
This adds the attributes in the supplied
Attributes to this
LdapAttributes . |
void |
addAttributes(Collection<LdapAttribute> c)
This adds a
Collection of attributes to this
LdapAttributes . |
void |
clear()
This removes all attributes from this
LdapAttributes . |
LdapAttribute |
getAttribute(String name)
This returns the
LdapAttribute for this
LdapAttributes with the supplied name. |
String[] |
getAttributeNames()
This returns an array of all the attribute names for this
LdapAttributes . |
Collection<LdapAttribute> |
getAttributes()
This returns a
Collection of LdapAttribute for
this LdapAttributes . |
int |
hashCode()
This returns the hash code for this object.
|
void |
removeAttribute(LdapAttribute a)
This removes an attribute from this
LdapAttributes . |
void |
removeAttribute(String name)
This removes the attribute with the supplied name.
|
void |
removeAttributes(Attributes a)
This removes the attributes in the supplied
Attributes from
this LdapAttributes . |
void |
removeAttributes(Collection<LdapAttribute> c)
This removes a
Collection of attributes from this
LdapAttributes . |
int |
size()
This returns the number of attributes in this attributes.
|
Attributes |
toAttributes()
This returns an
Attributes that represents this entry. |
String |
toString()
This returns a string representation of this object.
|
equals
public static final boolean DEFAULT_IGNORE_CASE
BasicAttributes
.protected static final int HASH_CODE_SEED
protected T extends Map<String,LdapAttribute> attributes
public AbstractLdapAttributes(LdapBeanFactory lbf)
AbstractLdapAttributes
with the supplied ldap
bean factory.lbf
- LdapBeanFactory
public Collection<LdapAttribute> getAttributes()
Collection
of LdapAttribute
for
this LdapAttributes
.getAttributes
in interface LdapAttributes
List
public LdapAttribute getAttribute(String name)
LdapAttribute
for this
LdapAttributes
with the supplied name.getAttribute
in interface LdapAttributes
name
- String
LdapAttribute
public String[] getAttributeNames()
LdapAttributes
.getAttributeNames
in interface LdapAttributes
String[]
public void addAttribute(LdapAttribute a)
LdapAttributes
.addAttribute
in interface LdapAttributes
a
- LdapAttribute
public void addAttribute(String name, Object value)
LdapAttributes
with the
supplied name and value.addAttribute
in interface LdapAttributes
name
- String
value
- Object
public void addAttribute(String name, List<?> values)
LdapAttributes
with the
supplied name and values.addAttribute
in interface LdapAttributes
name
- String
values
- List
public void addAttributes(Collection<LdapAttribute> c)
Collection
of attributes to this
LdapAttributes
. The collection should contain
LdapAttribute
objects.addAttributes
in interface LdapAttributes
c
- Collection
public void addAttributes(Attributes a) throws NamingException
Attributes
to this
LdapAttributes
.addAttributes
in interface LdapAttributes
a
- Attributes
NamingException
- if the attributes cannot be readpublic void removeAttribute(LdapAttribute a)
LdapAttributes
.removeAttribute
in interface LdapAttributes
a
- LdapAttribute
public void removeAttribute(String name)
removeAttribute
in interface LdapAttributes
name
- String
public void removeAttributes(Collection<LdapAttribute> c)
Collection
of attributes from this
LdapAttributes
. The collection should contain
LdapAttribute
objects.removeAttributes
in interface LdapAttributes
c
- Collection
public void removeAttributes(Attributes a) throws NamingException
Attributes
from
this LdapAttributes
.removeAttributes
in interface LdapAttributes
a
- Attributes
NamingException
- if the attributes cannot be readpublic int size()
size
in interface LdapAttributes
int
public void clear()
LdapAttributes
.clear
in interface LdapAttributes
public int hashCode()
hashCode
in class AbstractLdapBean
int
public String toString()
public Attributes toAttributes()
Attributes
that represents this entry.toAttributes
in interface LdapAttributes
Attributes
Copyright © 2019. All rights reserved.