|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DirContextOperations
Interface for DirContextAdapter.
DirContextAdapter
Field Summary |
---|
Fields inherited from interface javax.naming.directory.DirContext |
---|
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE |
Fields inherited from interface javax.naming.Context |
---|
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES |
Method Summary | |
---|---|
void |
addAttributeValue(java.lang.String name,
java.lang.Object value)
Add a value to the Attribute with the specified name. |
void |
addAttributeValue(java.lang.String name,
java.lang.Object value,
boolean addIfDuplicateExists)
Add a value to the Attribute with the specified name. |
javax.naming.directory.Attributes |
getAttributes()
Get all the Attributes. |
java.util.SortedSet |
getAttributeSortedStringSet(java.lang.String name)
Get all String values of the attribute as a SortedSet . |
javax.naming.Name |
getDn()
Returns the DN relative to the base path. |
java.lang.String |
getNameInNamespace()
|
java.lang.String[] |
getNamesOfModifiedAttributes()
Creates a String array of the names of the attributes which have been changed. |
java.lang.Object |
getObjectAttribute(java.lang.String name)
Get the value of an Object attribute. |
java.lang.Object[] |
getObjectAttributes(java.lang.String name)
Get all values of an Object attribute. |
java.lang.String |
getReferralUrl()
If this instance results from a referral, this method returns the url of the referred server. |
java.lang.String |
getStringAttribute(java.lang.String name)
Get the value of a String attribute. |
java.lang.String[] |
getStringAttributes(java.lang.String name)
Get all values of a String attribute. |
boolean |
isReferral()
Checks whether this instance results from a referral. |
boolean |
isUpdateMode()
Gets the update mode. |
void |
removeAttributeValue(java.lang.String name,
java.lang.Object value)
Remove a value from the Attribute with the specified name. |
void |
setAttributeValue(java.lang.String name,
java.lang.Object value)
Set the with the name name to the value . |
void |
setAttributeValues(java.lang.String name,
java.lang.Object[] values)
Sets a multivalue attribute, disregarding the order of the values. |
void |
setAttributeValues(java.lang.String name,
java.lang.Object[] values,
boolean orderMatters)
Sets a multivalue attribute. |
void |
setDn(javax.naming.Name dn)
Set the dn of this entry. |
void |
update()
Update the attributes.This will mean that the getters ( getStringAttribute methods) will return the updated values,
and the modifications will be forgotten (i.e. |
Methods inherited from interface javax.naming.directory.DirContext |
---|
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search |
Methods inherited from interface javax.naming.Context |
---|
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind |
Methods inherited from interface org.springframework.ldap.core.AttributeModificationsAware |
---|
getModificationItems |
Method Detail |
---|
boolean isUpdateMode()
AttributeModificationsAware.getModificationItems()
. The update
mode should be true
for a new entry and true
for an existing entry that is being updated.
java.lang.String[] getNamesOfModifiedAttributes()
java.lang.String getStringAttribute(java.lang.String name)
name
- name of the attribute.
java.lang.ClassCastException
- if the value of the entry is not a String.java.lang.Object getObjectAttribute(java.lang.String name)
name
- name of the attribute.
null
otherwise.void setAttributeValue(java.lang.String name, java.lang.Object value)
name
to the value
.
name
- name of the attribute.value
- value to set the attribute to.void setAttributeValues(java.lang.String name, java.lang.Object[] values)
name
- The id of the attribute.values
- Attribute values.void setAttributeValues(java.lang.String name, java.lang.Object[] values, boolean orderMatters)
name
- The id of the attribute.values
- Attribute values.orderMatters
- If true
, it will be changed even if data
was just reordered.void addAttributeValue(java.lang.String name, java.lang.Object value)
name
- the name of the Attribute to which the specified value should
be added.value
- the Attribute value to add.void addAttributeValue(java.lang.String name, java.lang.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.
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.void removeAttributeValue(java.lang.String name, java.lang.Object value)
name
- the name of the Attribute from which the specified value
should be removed.value
- the value to remove.void update()
getStringAttribute
methods) will return the updated values,
and the modifications will be forgotten (i.e.
AttributeModificationsAware.getModificationItems()
will return an
empty array.
java.lang.String[] getStringAttributes(java.lang.String name)
name
- name of the attribute.
null
otherwise.
java.lang.ArrayStoreException
- if any of the attribute values is not a
String.java.lang.Object[] getObjectAttributes(java.lang.String name)
name
- name of the attribute.
null
otherwise.java.util.SortedSet getAttributeSortedStringSet(java.lang.String name)
SortedSet
.
name
- name of the attribute.
SortedSet
containing all values of the attribute,
or null
if the attribute does not exist.javax.naming.Name getDn()
DirContextAdapter.getNameInNamespace()
void setDn(javax.naming.Name dn)
dn
- the dn.java.lang.String getNameInNamespace()
getNameInNamespace
in interface javax.naming.Context
java.lang.String getReferralUrl()
ldap://localhost:389
, or the empty string if this is not a
referral.boolean isReferral()
true
if this instance results from a referral,
false
otherwise.javax.naming.directory.Attributes getAttributes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |