Package com.sun.identity.setup
Class AMSetupDSConfig
- java.lang.Object
-
- com.sun.identity.setup.AMSetupDSConfig
-
public class AMSetupDSConfig extends Object
This class does Directory Server related tasks for OpenAM deployed as single web application.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconnectDSwithDN(boolean ssl)Check if Directory Server has the suffix.voidcreateBaseEntry(boolean ssl)Ensures that the base entry (root suffix) exists in an external directory server, creating it when it is missing.static AMSetupDSConfiggetInstance()Returns a single instance if not already created.voidloadSchemaFiles(List schemaFiles)Loads the schema files into the directory Server.voidsetDSValues()Set the values required for Service Schema files.voidsetLocale(Locale locale)
-
-
-
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-trueif directory server is running on LDAPS.- Returns:
trueif specified suffix exists.
-
createBaseEntry
public void createBaseEntry(boolean ssl) throws ConfiguratorExceptionEnsures 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,oorou).- Parameters:
ssl-trueif 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.
-
-