edu.vt.middleware.ldap.bean
T - type of backing setpublic abstract class AbstractLdapAttribute<T extends java.util.Set<java.lang.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 java.lang.String |
name
Name for this attribute.
|
protected java.util.Set<java.lang.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(java.util.Set<java.lang.String> stringValues)
Converts the underlying set of objects to a set of strings.
|
java.lang.String |
getName()
This returns the name of this
LdapAttribute. |
abstract java.util.Set<java.lang.String> |
getStringValues()
This returns the value(s) of this
LdapAttribute Values are
encoded in base64 format if the underlying value is of type byte[]. |
java.util.Set<java.lang.Object> |
getValues()
This returns the value(s) of this
LdapAttribute. |
int |
hashCode()
This returns the hash code for this object.
|
void |
setAttribute(javax.naming.directory.Attribute attribute)
This sets this
LdapAttribute using the supplied attribute. |
void |
setName(java.lang.String name)
This sets the name of this
LdapAttribute. |
javax.naming.directory.Attribute |
toAttribute()
This returns an
Attribute that represents the values in this
LdapAttribute. |
java.lang.String |
toString()
This returns a string representation of this object.
|
equalsprotected static final int HASH_CODE_SEED
protected java.lang.String name
protected java.util.Set<java.lang.Object> values
public AbstractLdapAttribute(LdapBeanFactory lbf)
AbstractLdapAttribute with the supplied ldap
bean factory.lbf - LdapBeanFactorypublic java.lang.String getName()
LdapAttribute.getName in interface LdapAttributeStringpublic java.util.Set<java.lang.Object> getValues()
LdapAttribute.getValues in interface LdapAttributeSetpublic abstract java.util.Set<java.lang.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 LdapAttributeSetpublic void setAttribute(javax.naming.directory.Attribute attribute)
throws javax.naming.NamingException
LdapAttribute using the supplied attribute.setAttribute in interface LdapAttributeattribute - Attributejavax.naming.NamingException - if the attribute values cannot be readpublic void setName(java.lang.String name)
LdapAttribute.setName in interface LdapAttributename - Stringpublic int hashCode()
hashCode in class AbstractLdapBeanintpublic java.lang.String toString()
toString in class java.lang.ObjectStringpublic javax.naming.directory.Attribute toAttribute()
Attribute that represents the values in this
LdapAttribute.toAttribute in interface LdapAttributeAttributeprotected void convertValuesToString(java.util.Set<java.lang.String> stringValues)
stringValues - Set to populate with stringsCopyright © 2014. All Rights Reserved.