public class ApacheDsService
extends java.lang.Object
InstanceLayout.| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
BANNER_CHANGE_PWD |
private static java.lang.String |
BANNER_KERBEROS |
private static java.lang.String |
BANNER_LDAP |
private static java.lang.String |
BANNER_NTP |
private LdifPartition |
configPartition
The configuration partition
|
private ConfigPartitionReader |
cpReader
The configuration reader instance
|
private org.apache.directory.api.ldap.model.schema.syntaxCheckers.CsnSyntaxChecker |
csnChecker
The CSN syntax checker instance
|
private HttpServer |
httpServer
The started HttpServer
|
private boolean |
isSchemaPartitionFirstExtraction |
private KdcServer |
kdcServer
The Change Password server instance *
private ChangePasswordServer changePwdServer;/
/** The Kerberos server instance
|
private LdapServer |
ldapServer
The LDAP server instance
|
private static org.slf4j.Logger |
LOG
A logger for this class
|
private static java.lang.String[] |
MANDATORY_ENTRY_ATOP_AT |
private static java.util.Map<java.lang.String,org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> |
MANDATORY_ENTRY_ATOP_MAP |
private NtpServer |
ntpServer
The NTP server instance
|
private LdifPartition |
schemaLdifPartition
The Schema partition
|
private org.apache.directory.api.ldap.model.schema.SchemaManager |
schemaManager
The SchemaManager instance
|
private org.apache.directory.api.ldap.model.schema.syntaxCheckers.GeneralizedTimeSyntaxChecker |
timeChecker |
private org.apache.directory.api.ldap.model.schema.syntaxCheckers.UuidSyntaxChecker |
uuidChecker
The UUID syntax checker instance
|
| Constructor and Description |
|---|
ApacheDsService() |
| Modifier and Type | Method and Description |
|---|---|
DirectoryService |
getDirectoryService() |
private void |
initConfigPartition(InstanceLayout instanceLayout,
DnFactory dnFactory,
CacheService cacheService)
initializes a LDIF partition for configuration
|
private DirectoryService |
initDirectoryService(InstanceLayout instanceLayout,
DirectoryServiceBean directoryServiceBean,
CacheService cacheService,
DnFactory dnFactory) |
private void |
initSchemaLdifPartition(InstanceLayout instanceLayout,
DnFactory dnFactory)
Initialize the schema partition
|
private void |
initSchemaManager(InstanceLayout instanceLayout)
Initialize the schema Manager by loading the schema LDIF files
|
static void |
printBanner(java.lang.String bannerConstant)
Print the banner for a server
|
void |
start(InstanceLayout instanceLayout)
starts various services configured according to the
configuration present in the given instance's layout
|
private void |
startHttpServer(HttpServerBean httpServerBean,
DirectoryService directoryService)
start the embedded HTTP server
|
private void |
startKerberos(DirectoryServiceBean directoryServiceBean,
DirectoryService directoryService)
start the KERBEROS server
|
private void |
startLdap(LdapServerBean ldapServerBean,
DirectoryService directoryService)
start the LDAP server
|
private void |
startNtp(NtpServerBean ntpServerBean,
DirectoryService directoryService)
start the NTP server
|
void |
stop() |
void |
synch() |
void |
updateMandatoryOpAttributes(Partition partition,
DirectoryService dirService)
adds mandatory operational attributes
MANDATORY_ENTRY_ATOP_MAP and updates all the LDIF files. |
private static final org.slf4j.Logger LOG
private LdapServer ldapServer
private NtpServer ntpServer
private KdcServer kdcServer
private HttpServer httpServer
private LdifPartition schemaLdifPartition
private org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager
private LdifPartition configPartition
private ConfigPartitionReader cpReader
private org.apache.directory.api.ldap.model.schema.syntaxCheckers.UuidSyntaxChecker uuidChecker
private org.apache.directory.api.ldap.model.schema.syntaxCheckers.CsnSyntaxChecker csnChecker
private org.apache.directory.api.ldap.model.schema.syntaxCheckers.GeneralizedTimeSyntaxChecker timeChecker
private static final java.util.Map<java.lang.String,org.apache.directory.api.ldap.model.schema.AttributeTypeOptions> MANDATORY_ENTRY_ATOP_MAP
private static final java.lang.String[] MANDATORY_ENTRY_ATOP_AT
private boolean isSchemaPartitionFirstExtraction
private static final java.lang.String BANNER_LDAP
private static final java.lang.String BANNER_NTP
private static final java.lang.String BANNER_KERBEROS
private static final java.lang.String BANNER_CHANGE_PWD
public void start(InstanceLayout instanceLayout) throws java.lang.Exception
instanceLayout - the on disk location's layout of the intance to be startedjava.lang.Exceptionprivate void initSchemaManager(InstanceLayout instanceLayout) throws java.lang.Exception
instanceLayout - the instance layoutjava.lang.Exception - in case of any problems while extracting and writing the schema filesprivate void initSchemaLdifPartition(InstanceLayout instanceLayout, DnFactory dnFactory) throws java.lang.Exception
instanceLayout - the instance layoutjava.lang.Exception - in case of any problems while initializing the SchemaPartitionprivate void initConfigPartition(InstanceLayout instanceLayout, DnFactory dnFactory, CacheService cacheService) throws java.lang.Exception
instanceLayout - the instance layoutcacheService - the Cache servicejava.lang.Exception - in case of any issues while extracting the schemaprivate DirectoryService initDirectoryService(InstanceLayout instanceLayout, DirectoryServiceBean directoryServiceBean, CacheService cacheService, DnFactory dnFactory) throws java.lang.Exception
java.lang.Exceptionprivate void startLdap(LdapServerBean ldapServerBean, DirectoryService directoryService) throws java.lang.Exception
java.lang.Exceptionprivate void startNtp(NtpServerBean ntpServerBean, DirectoryService directoryService) throws java.lang.Exception
java.lang.Exceptionprivate void startKerberos(DirectoryServiceBean directoryServiceBean, DirectoryService directoryService) throws java.lang.Exception
java.lang.Exceptionprivate void startHttpServer(HttpServerBean httpServerBean, DirectoryService directoryService) throws java.lang.Exception
java.lang.Exceptionpublic DirectoryService getDirectoryService()
public void synch()
throws java.lang.Exception
java.lang.Exceptionpublic void stop()
throws java.lang.Exception
java.lang.Exceptionpublic static void printBanner(java.lang.String bannerConstant)
public void updateMandatoryOpAttributes(Partition partition, DirectoryService dirService) throws java.lang.Exception
MANDATORY_ENTRY_ATOP_MAP and updates all the LDIF files.
WARN: this method is only called for the first time when schema and config files are bootstrapped
afterwards it is the responsibility of the user to ensure correctness of LDIF files if modified
by hand
Note: we do these modifications explicitly cause we have no idea if each entry's LDIF file has the
correct values for all these mandatory attributespartition - instance of the partition Note: should only be those which are loaded before starting the DirectoryServicedirService - the DirectoryService instancejava.lang.Exception