Class LDAPDirectory

java.lang.Object
org.nuxeo.ecm.directory.AbstractDirectory
org.nuxeo.ecm.directory.ldap.LDAPDirectory
All Implemented Interfaces:
Directory

public class LDAPDirectory extends AbstractDirectory
Implementation of the Directory interface for servers implementing the Lightweight Directory Access Protocol.
Author:
ogrisel, Robert Browning
  • Field Details

  • Constructor Details

  • Method Details

    • getDescriptor

      public LDAPDirectoryDescriptor getDescriptor()
      Description copied from interface: Directory
      Get descriptor
    • addReferences

      protected void addReferences()
      Overrides:
      addReferences in class AbstractDirectory
    • getReferences

      public List<Reference> getReferences(String referenceFieldName)
      Description copied from interface: Directory
      Lookup the References by field name.
      Specified by:
      getReferences in interface Directory
      Overrides:
      getReferences in class AbstractDirectory
      Returns:
      the matching references implementation or null
    • initialize

      public void initialize()
      Description copied from interface: Directory
      INTERNAL, DO NOT CALL. Initializes the directory when Nuxeo starts. Called without a transaction.
      Specified by:
      initialize in interface Directory
      Overrides:
      initialize in class AbstractDirectory
    • computeContextProperties

      protected Properties computeContextProperties()
      Returns:
      connection parameters to use for all LDAP queries
    • setSystemProperty

      protected void setSystemProperty(String key, String value)
      Sets a System property, except if it's already set, to allow for external configuration.
    • getContextProperties

      public Properties getContextProperties()
    • computeIdSearchControls

      protected SearchControls computeIdSearchControls()
    • computeSearchControls

      protected SearchControls computeSearchControls()
      Search controls that only fetch attributes defined by the schema
      Returns:
      common search controls to use for all LDAP search queries
    • getIdSearchControls

      public SearchControls getIdSearchControls()
      Search controls that only fetch the id.
      Since:
      10.3
    • getSearchControls

      public SearchControls getSearchControls()
    • getSearchControls

      public SearchControls getSearchControls(boolean fetchAllAttributes)
    • createContext

      protected DirContext createContext()
    • getServer

      public LDAPServerDescriptor getServer()
      Returns:
      ldap server descriptor bound to this directory
      Since:
      5.7
    • getSession

      public LDAPSession getSession()
      Description copied from interface: Directory
      Creates a session for accessing entries in this directory.
      Returns:
      a Session object
    • getBaseFilter

      public String getBaseFilter()
    • addBaseFilter

      public String addBaseFilter(String filter)
    • getTestServer

      protected ContextProvider getTestServer()
    • setTestServer

      public void setTestServer(ContextProvider testServer)