T
- type of backing setpublic abstract class AbstractLdapAttribute<T extends Set<Object>> extends AbstractLdapBean implements LdapAttribute
AbstractLdapAttribute
provides a base implementation of
LdapAttribute
where the underlying values are backed by a
Set
.Modifier and Type | Field and Description |
---|---|
protected static int |
HASH_CODE_SEED
hash code seed.
|
protected String |
name
Name for this attribute.
|
protected Set<Object> |
values
Values for this attribute.
|
beanFactory, logger
Constructor and Description |
---|
AbstractLdapAttribute(LdapBeanFactory lbf)
Creates a new
AbstractLdapAttribute with the supplied ldap
bean factory. |
Modifier and Type | Method and Description |
---|---|
protected void |
convertValuesToString(Set<String> stringValues)
Converts the underlying set of objects to a set of strings.
|
String |
getName()
This returns the name of this
LdapAttribute . |
abstract Set<String> |
getStringValues()
This returns the value(s) of this
LdapAttribute Values are
encoded in base64 format if the underlying value is of type byte[]. |
Set<Object> |
getValues()
This returns the value(s) of this
LdapAttribute . |
int |
hashCode()
This returns the hash code for this object.
|
void |
setAttribute(Attribute attribute)
This sets this
LdapAttribute using the supplied attribute. |
void |
setName(String name)
This sets the name of this
LdapAttribute . |
Attribute |
toAttribute()
This returns an
Attribute that represents the values in this
LdapAttribute . |
String |
toString()
This returns a string representation of this object.
|
equals
protected static final int HASH_CODE_SEED
protected String name
public AbstractLdapAttribute(LdapBeanFactory lbf)
AbstractLdapAttribute
with the supplied ldap
bean factory.lbf
- LdapBeanFactory
public String getName()
LdapAttribute
.getName
in interface LdapAttribute
String
public Set<Object> getValues()
LdapAttribute
.getValues
in interface LdapAttribute
Set
public abstract Set<String> getStringValues()
LdapAttribute
Values are
encoded in base64 format if the underlying value is of type byte[]. The
returned set is unmodifiable.getStringValues
in interface LdapAttribute
Set
public void setAttribute(Attribute attribute) throws NamingException
LdapAttribute
using the supplied attribute.setAttribute
in interface LdapAttribute
attribute
- Attribute
NamingException
- if the attribute values cannot be readpublic void setName(String name)
LdapAttribute
.setName
in interface LdapAttribute
name
- String
public int hashCode()
hashCode
in class AbstractLdapBean
int
public String toString()
public Attribute toAttribute()
Attribute
that represents the values in this
LdapAttribute
.toAttribute
in interface LdapAttribute
Attribute
protected void convertValuesToString(Set<String> stringValues)
stringValues
- Set
to populate with stringsCopyright © 2019. All rights reserved.