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.
  Author:
    Mattias Hellborg Arthursson
  See Also:
    `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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getNameInNamespace()`
    `String[]` | `getNamesOfModifiedAttributes()` Creates a String array of the names of the attributes which have been changed.
    `String` | `getReferralUrl()` If this instance results from a referral, this method returns the url of the referred server.
    `boolean` | `isReferral()` Checks whether this instance results from a referral.
    `boolean` | `isUpdateMode()` Gets the update mode.
    `void` | `setDn(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.LdapDataEntry

      `addAttributeValue, addAttributeValue, attributeExists, getAttributes, getAttributeSortedStringSet, getDn, getObjectAttribute, getObjectAttributes, getStringAttribute, getStringAttributes, removeAttributeValue, setAttributeValue, setAttributeValues, setAttributeValues`

    - ### Methods inherited from interface org.springframework.ldap.core.AttributeModificationsAware

      `getModificationItems`

- - ### Method Detail

    - #### isUpdateMode

          boolean isUpdateMode()

      Gets the update mode. An entry in update mode will keep track of its modifications so that they can be retrieved using `AttributeModificationsAware.getModificationItems()`. The update mode should be `true` for a new entry and `true` 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

          void setDn(Name dn)

      Set the dn of this entry.
      Parameters:
        `dn` - the dn.

    - #### getNameInNamespace

          String getNameInNamespace()

      Specified by:
        `getNameInNamespace` in interface `Context`

    - #### 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