Class 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
    • Method Detail

      • 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​(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)
      • setTestServer

        public void setTestServer​(ContextProvider testServer)