Package org.springframework.ldap.core
Interface DirContextOperations
- All Superinterfaces:
AttributeModificationsAware
,Context
,DirContext
,LdapDataEntry
- All Known Implementing Classes:
DirContextAdapter
public interface DirContextOperations
extends DirContext, LdapDataEntry, AttributeModificationsAware
Interface for DirContextAdapter.
- See Also:
-
Field Summary
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
Fields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Creates a String array of the names of the attributes which have been changed.If this instance results from a referral, this method returns the url of the referred server.boolean
Checks whether this instance results from a referral.boolean
Gets the update mode.void
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 org.springframework.ldap.core.AttributeModificationsAware
getModificationItems
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 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 org.springframework.LdapDataEntry
addAttributeValue, addAttributeValue, attributeExists, getAttributes, getAttributeSortedStringSet, getDn, getObjectAttribute, getObjectAttributes, getStringAttribute, getStringAttributes, removeAttributeValue, setAttributeValue, setAttributeValues, setAttributeValues
-
Method Details
-
isUpdateMode
boolean isUpdateMode()Gets the update mode. An entry in update mode will keep track of its modifications so that they can be retrieved usingAttributeModificationsAware.getModificationItems()
. The update mode should betrue
for a new entry andtrue
for an existing entry that is being updated.- Returns:
- update mode.
-
getNamesOfModifiedAttributes
String[] getNamesOfModifiedAttributes()Creates a String array of the names of the attributes which have been changed. If this is a new entry, all set entries will be in the list. If this is an updated entry, only changed and removed entries will be in the array.- Returns:
- Array of String
-
update
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.AttributeModificationsAware.getModificationItems()
will return an empty array. -
setDn
Set the dn of this entry.- Parameters:
dn
- the dn.
-
getNameInNamespace
String getNameInNamespace()- Specified by:
getNameInNamespace
in interfaceContext
-
getReferralUrl
String getReferralUrl()If this instance results from a referral, this method returns the url of the referred server.- Returns:
- The url of the referred server, e.g.
ldap://localhost:389
, or the empty string if this is not a referral. - Since:
- 1.3
-
isReferral
boolean isReferral()Checks whether this instance results from a referral.- Returns:
true
if this instance results from a referral,false
otherwise.- Since:
- 1.3
-