Class ApacheDSContainer

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle

    @Deprecated
    public class ApacheDSContainer
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.Lifecycle, org.springframework.context.ApplicationContextAware
    Deprecated.
    Use UnboundIdContainer instead because ApacheDS 1.x is no longer supported with no GA version to replace it.
    Provides lifecycle services for the embedded apacheDS server defined by the supplied configuration. Used by LdapServerBeanDefinitionParser. An instance will be stored in the application context for each embedded server instance. It will start the server when the context is initialized and shut it down when it is closed. It is intended for temporary embedded use and will not retain changes across start/stop boundaries. The working directory is deleted on shutdown.

    If used repeatedly in a single JVM process with the same configuration (for example, when repeatedly loading an application context during testing), it's important that the application context is closed to allow the bean to be disposed of and the server shutdown prior to attempting to start it again.

    This class is intended for testing and internal security namespace use, only, and is not considered part of the framework's public API.

    • Constructor Summary

      Constructors 
      Constructor Description
      ApacheDSContainer​(java.lang.String root, java.lang.String ldifs)
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()
      Deprecated.
       
      void destroy()
      Deprecated.
       
      int getPort()
      Deprecated.
       
      org.apache.directory.server.core.DefaultDirectoryService getService()
      Deprecated.
       
      boolean isRunning()
      Deprecated.
       
      void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
      Deprecated.
       
      void setCertificatePassord​(java.lang.String certificatePassord)
      Deprecated.
      Will set the certificate password on the underlying LdapServer.
      void setKeyStoreFile​(java.io.File keyStoreFile)
      Deprecated.
      The keyStore must not be null and must be a valid file.
      void setLdapOverSslEnabled​(boolean ldapOverSslEnabled)
      Deprecated.
      If set to true will enable LDAP over SSL (LDAPs).
      void setPort​(int port)
      Deprecated.
       
      void setWorkingDirectory​(java.io.File workingDir)
      Deprecated.
       
      void start()
      Deprecated.
       
      void stop()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ApacheDSContainer

        public ApacheDSContainer​(java.lang.String root,
                                 java.lang.String ldifs)
                          throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Deprecated.
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • destroy

        public void destroy()
        Deprecated.
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Deprecated.
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • setWorkingDirectory

        public void setWorkingDirectory​(java.io.File workingDir)
        Deprecated.
      • setPort

        public void setPort​(int port)
        Deprecated.
      • getPort

        public int getPort()
        Deprecated.
      • setLdapOverSslEnabled

        public void setLdapOverSslEnabled​(boolean ldapOverSslEnabled)
        Deprecated.
        If set to true will enable LDAP over SSL (LDAPs). If set to true setCertificatePassord(String) must be set as well.
        Parameters:
        ldapOverSslEnabled - If not set, will default to false
      • setKeyStoreFile

        public void setKeyStoreFile​(java.io.File keyStoreFile)
        Deprecated.
        The keyStore must not be null and must be a valid file. Will set the keyStore file on the underlying LdapServer.
        Parameters:
        keyStoreFile - Mandatory if LDAPs is enabled
      • setCertificatePassord

        public void setCertificatePassord​(java.lang.String certificatePassord)
        Deprecated.
        Will set the certificate password on the underlying LdapServer.
        Parameters:
        certificatePassord - May be null
      • getService

        public org.apache.directory.server.core.DefaultDirectoryService getService()
        Deprecated.
      • start

        public void start()
        Deprecated.
        Specified by:
        start in interface org.springframework.context.Lifecycle
      • stop

        public void stop()
        Deprecated.
        Specified by:
        stop in interface org.springframework.context.Lifecycle
      • isRunning

        public boolean isRunning()
        Deprecated.
        Specified by:
        isRunning in interface org.springframework.context.Lifecycle