|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LdapDataEntry
Common data access methods for entries in an LDAP tree.
Method Summary | |
---|---|
void |
addAttributeValue(String name,
Object value)
Add a value to the Attribute with the specified name. |
void |
addAttributeValue(String name,
Object value,
boolean addIfDuplicateExists)
Add a value to the Attribute with the specified name. |
boolean |
attributeExists(String name)
Check if an Object attribute exists, regardless of whether it has a value or not. |
Attributes |
getAttributes()
Get all the Attributes. |
SortedSet<String> |
getAttributeSortedStringSet(String name)
Get all String values of the attribute as a SortedSet . |
Name |
getDn()
Returns the DN relative to the base path. |
Object |
getObjectAttribute(String name)
Get the value of an Object attribute. |
Object[] |
getObjectAttributes(String name)
Get all values of an Object attribute. |
String |
getStringAttribute(String name)
Get the value of a String attribute. |
String[] |
getStringAttributes(String name)
Get all values of a String attribute. |
void |
removeAttributeValue(String name,
Object value)
Remove a value from the Attribute with the specified name. |
void |
setAttributeValue(String name,
Object value)
Set the with the name name to the value . |
void |
setAttributeValues(String name,
Object[] values)
Sets a multivalue attribute, disregarding the order of the values. |
void |
setAttributeValues(String name,
Object[] values,
boolean orderMatters)
Sets a multivalue attribute. |
Method Detail |
---|
String getStringAttribute(String name)
null
will be returned.
name
- name of the attribute.
null
if
the attribute doesn't exist or if it exists but with no value.
ClassCastException
- if the value of the entry is not a String.Object getObjectAttribute(String name)
null
will be returned.
name
- name of the attribute.
null
if the attribute doesn't exist or if it exists but with
no value.boolean attributeExists(String name)
name
- name of the attribute
true
if the attribute exists, false
otherwisevoid setAttributeValue(String name, Object value)
name
to the value
.
If the value is a Name
instance, equality for Distinguished
Names will be used for calculating attribute modifications.
name
- name of the attribute.value
- value to set the attribute to.
IllegalArgumentException
- if the value is a Name
instance
and one or several of the currently present attribute values is not
Name
instances or Strings representing valid Distinguished Names.void setAttributeValues(String name, Object[] values)
Name
instances, equality for Distinguished
Names will be used for calculating attribute modifications.
name
- The id of the attribute.values
- Attribute values.
IllegalArgumentException
- if value is a Name
instance
and one or several of the currently present attribute values is not
Name
instances or Strings representing valid Distinguished Names.void setAttributeValues(String name, Object[] values, boolean orderMatters)
Name
instances, equality for Distinguished
Names will be used for calculating attribute modifications.
name
- The id of the attribute.values
- Attribute values.orderMatters
- If true
, it will be changed even if data
was just reordered.
IllegalArgumentException
- if value is a Name
instance
and one or several of the currently present attribute values is not
Name
instances or Strings representing valid Distinguished Names.void addAttributeValue(String name, Object value)
Name
instance, equality for Distinguished
Names will be used for calculating attribute modifications.
name
- the name of the Attribute to which the specified value should
be added.value
- the Attribute value to add.
IllegalArgumentException
- if value is a Name
instance
and one or several of the currently present attribute values is not
Name
instances or Strings representing valid Distinguished Names.void addAttributeValue(String name, Object value, boolean addIfDuplicateExists)
addIfDuplicateExists
parameter controls the handling of duplicates. It false
,
this method makes sure that the there will be no duplicates of an added
value - it the value exists it will not be added again.
If the value is a Name
instance, equality for Distinguished
Names will be used for calculating attribute modifications.
name
- the name of the Attribute to which the specified value should
be added.value
- the Attribute value to add.addIfDuplicateExists
- true
will add the value
regardless of whether there is an identical value already, allowing for
duplicate attribute values; false
will not add the value if
it already exists.
IllegalArgumentException
- if value is a Name
instance
and one or several of the currently present attribute values is not
Name
instances or Strings representing valid Distinguished Names.void removeAttributeValue(String name, Object value)
Name
instance, equality for Distinguished
Names will be used for calculating attribute modifications.
name
- the name of the Attribute from which the specified value
should be removed.value
- the value to remove.
IllegalArgumentException
- if value is a Name
instance
and one or several of the currently present attribute values is not
Name
instances or Strings representing valid Distinguished Names.String[] getStringAttributes(String name)
name
- name of the attribute.
null
otherwise.
IllegalArgumentException
- if any of the attribute values is not a
String.Object[] getObjectAttributes(String name)
name
- name of the attribute.
null
otherwise.SortedSet<String> getAttributeSortedStringSet(String name)
SortedSet
.
name
- name of the attribute.
SortedSet
containing all values of the attribute,
or null
if the attribute does not exist.
IllegalArgumentException
- if one of the found attribute values cannot be cast to a String.Name getDn()
DirContextAdapter.getNameInNamespace()
Attributes getAttributes()
|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |