Class AMSetupDSConfig


  • public class AMSetupDSConfig
    extends Object
    This class does Directory Server related tasks for OpenAM deployed as single web application.
    • Method Detail

      • getInstance

        public static AMSetupDSConfig getInstance()
        Returns a single instance if not already created.
        Returns:
        AMSetupDSConfig instance.
      • setLocale

        public void setLocale​(Locale locale)
      • setDSValues

        public void setDSValues()
        Set the values required for Service Schema files.
      • connectDSwithDN

        public boolean connectDSwithDN​(boolean ssl)
        Check if Directory Server has the suffix.
        Parameters:
        ssl - true if directory server is running on LDAPS.
        Returns:
        true if specified suffix exists.
      • createBaseEntry

        public void createBaseEntry​(boolean ssl)
                             throws ConfiguratorException
        Ensures that the base entry (root suffix) exists in an external directory server, creating it when it is missing.

        For an embedded OpenDJ the suffix is created from openam_suffix.ldif. When OpenAM is installed against an external directory server the suffix is assumed to already exist (e.g. created by the OpenDJ docker image with --addBaseEntry). This method makes OpenAM create the base entry itself so the installation succeeds even when the suffix has not been pre-created.

        The method is idempotent: if the suffix already exists nothing is done. The object class of the created entry is derived from the naming attribute of the suffix (dc, o or ou).

        Parameters:
        ssl - true if the directory server is running on LDAPS.
        Throws:
        ConfiguratorException - if the base entry cannot be created.
      • loadSchemaFiles

        public void loadSchemaFiles​(List schemaFiles)
                             throws ConfiguratorException
        Loads the schema files into the directory Server.
        Parameters:
        schemaFiles - Array of schema files to load.
        Throws:
        ConfiguratorException - if unable to load schema.