public final class ServiceBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
static Authenticator |
createAuthenticator(AuthenticatorBean authenticatorBean)
Creates a Authenticator from the configuration
|
static Authenticator[] |
createAuthenticators(List<AuthenticatorBean> list)
Creates the array of transports read from the DIT
|
static ChangeLog |
createChangeLog(ChangeLogBean changeLogBean)
Read the configuration for the ChangeLog system
|
static DirectoryService |
createDirectoryService(DirectoryServiceBean directoryServiceBean,
InstanceLayout instanceLayout,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Instantiates a DirectoryService based on the configuration present in the partition
|
static HttpServer |
createHttpServer(HttpServerBean httpServerBean,
DirectoryService directoryService)
Instantiates a HttpServer based on the configuration present in the partition
|
static Set<WebApp> |
createHttpWebApps(List<HttpWebAppBean> httpWebAppBeans,
DirectoryService directoryService)
Instantiates the HttpWebApps based on the configuration present in the partition
|
static List<Interceptor> |
createInterceptors(List<InterceptorBean> interceptorBeans)
Creates the Interceptor instances from the configuration
|
static JdbmIndex<?> |
createJdbmIndex(JdbmPartition partition,
JdbmIndexBean jdbmIndexBean,
DirectoryService directoryService)
Create a new instance of a JdbmIndex from an instance of JdbmIndexBean
|
static JdbmPartition |
createJdbmPartition(DirectoryService directoryService,
JdbmPartitionBean jdbmPartitionBean)
Create a new instance of a JdbmPartition
|
static Journal |
createJournal(JournalBean journalBean)
Instantiate the Journal object from the stored configuration
|
static KdcServer |
createKdcServer(DirectoryServiceBean directoryServiceBean,
DirectoryService directoryService)
Instantiates a DhcpServer based on the configuration present in the partition
|
static LdapServer |
createLdapServer(LdapServerBean ldapServerBean,
DirectoryService directoryService)
Instantiates a LdapServer based on the configuration present in the partition
|
static MavibotIndex<?> |
createMavibotIndex(MavibotPartition partition,
MavibotIndexBean mavobotIndexBean,
DirectoryService directoryService)
Create a new instance of a MavibotIndex from an instance of MavibotIndexBean
|
static MavibotPartition |
createMavibotPartition(DirectoryService directoryService,
MavibotPartitionBean mvbtPartitionBean) |
static NtpServer |
createNtpServer(NtpServerBean ntpServerBean,
DirectoryService directoryService)
Instantiates a NtpServer based on the configuration present in the partition
|
static Partition |
createPartition(DirectoryService directoryService,
PartitionBean partitionBean)
Create the a Partition instantiated from the configuration
|
static Map<String,Partition> |
createPartitions(DirectoryService directoryService,
List<PartitionBean> partitionBeans)
Create the set of Partitions instantiated from the configuration
|
static PasswordPolicyConfiguration |
createPwdPolicyConfig(PasswordPolicyBean passwordPolicyBean)
creates the PassworddPolicyConfiguration object after reading the config entry containing pwdpolicy OC
|
static List<ReplicationConsumer> |
createReplConsumers(List<ReplConsumerBean> replConsumerBeans)
instantiate the ReplicationConsumers based on the configuration present in ReplConsumerBeans
|
static MechanismHandler |
createSaslMechHandler(SaslMechHandlerBean saslMechHandlerBean)
Loads and instantiates a MechanismHandler from the configuration entry
|
static Transport |
createTransport(TransportBean transportBean)
Creates a Transport from the configuration
|
static Transport[] |
createTransports(TransportBean[] transportBeans)
Creates the array of transports read from the DIT
|
static List<org.apache.directory.api.ldap.model.ldif.LdifEntry> |
readTestEntries(String entryFilePath)
Load the Test entries
|
public static List<Interceptor> createInterceptors(List<InterceptorBean> interceptorBeans) throws org.apache.directory.api.ldap.model.exception.LdapException
dirServiceDN - the Dn under which interceptors are configuredException - If the instanciation failedorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic static PasswordPolicyConfiguration createPwdPolicyConfig(PasswordPolicyBean passwordPolicyBean)
PasswordPolicyBean - The Bean containing the PasswordPolicy configurationPasswordPolicyConfiguration object, null if the pwdpolicy entry is not present or disabledpublic static ChangeLog createChangeLog(ChangeLogBean changeLogBean)
changelogBean - The Bean containing the ChangeLog configurationpublic static Journal createJournal(JournalBean journalBean)
changelogBean - The Bean containing the ChangeLog configurationpublic static List<org.apache.directory.api.ldap.model.ldif.LdifEntry> readTestEntries(String entryFilePath) throws ConfigurationException
entryFilePath - The place on disk where the test entries are storedConfigurationException - If we weren't able to read the entriespublic static MechanismHandler createSaslMechHandler(SaslMechHandlerBean saslMechHandlerBean) throws ConfigurationException
saslMechHandlerEntry - the entry of OC type ConfigSchemaConstants#ADS_LDAP_SERVER_SASL_MECH_HANDLER_OCConfigurationException - if the SASL mechanism handler cannot be createdpublic static Authenticator createAuthenticator(AuthenticatorBean authenticatorBean) throws ConfigurationException
authenticatorBean - The created instance of authenticatorConfigurationExceptionpublic static Transport createTransport(TransportBean transportBean)
transportBean - The created instance of transportpublic static Authenticator[] createAuthenticators(List<AuthenticatorBean> list) throws ConfigurationException
transportBeans - The array of Transport configurationConfigurationExceptionpublic static Transport[] createTransports(TransportBean[] transportBeans)
transportBeans - The array of Transport configurationpublic static NtpServer createNtpServer(NtpServerBean ntpServerBean, DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
ntpServerBean - The NtpServerBean containing the NtpServer configurationorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic static KdcServer createKdcServer(DirectoryServiceBean directoryServiceBean, DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
dhcpServerBean - The DhcpServerBean containing the DhcpServer configurationkdcServerBean - The KdcServerBean containing the KdcServer configurationorg.apache.directory.api.ldap.model.exception.LdapException - public static DhcpServer createDhcpServer( DhcpServerBean dhcpServerBean, DirectoryService directoryService ) throws LdapException
{
// Fist, do nothing if the DhcpServer is disabled
if ( !dhcpServerBean.isEnabled() )
{
return null;
}
DhcpServer dhcpServer = new DhcpServer();
// The service ID
dhcpServer.setServiceId( dhcpServerBean.getServerId() );
// The transports
Transport[] transports = createTransports( dhcpServerBean.getTransports() );
dhcpServer.setTransports( transports );
return dhcpServer;
}
/**
Instantiates a KdcServer based on the configuration present in the partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic static Set<WebApp> createHttpWebApps(List<HttpWebAppBean> httpWebAppBeans, DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
httpWebAppBeans - The list of HttpWebAppBeans containing the HttpWebAppBeans configurationorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic static HttpServer createHttpServer(HttpServerBean httpServerBean, DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
httpServerBean - The HttpServerBean containing the HttpServer configurationorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic static LdapServer createLdapServer(LdapServerBean ldapServerBean, DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
ldapServerBean - The LdapServerBean containing the LdapServer configurationorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic static List<ReplicationConsumer> createReplConsumers(List<ReplConsumerBean> replConsumerBeans) throws ConfigurationException
replConsumerBeans - the list of consumers configuredConfigurationExceptionpublic static JdbmIndex<?> createJdbmIndex(JdbmPartition partition, JdbmIndexBean jdbmIndexBean, DirectoryService directoryService)
JdbmIndexBean - The JdbmIndexBean to convertException - If the instance cannot be createdpublic static JdbmPartition createJdbmPartition(DirectoryService directoryService, JdbmPartitionBean jdbmPartitionBean) throws ConfigurationException
jdbmPartitionBean - the JdbmPartition beanorg.apache.directory.api.ldap.model.exception.LdapInvalidDnExceptionException - If the instance cannot be createdConfigurationExceptionpublic static Partition createPartition(DirectoryService directoryService, PartitionBean partitionBean) throws ConfigurationException
partitionBean - the Partition beanConfigurationException - If we cannot process the Partitionpublic static Map<String,Partition> createPartitions(DirectoryService directoryService, List<PartitionBean> partitionBeans) throws ConfigurationException
partitionBeans - the list of Partition beansConfigurationException - If we cannot process some Partitionpublic static DirectoryService createDirectoryService(DirectoryServiceBean directoryServiceBean, InstanceLayout instanceLayout, org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) throws Exception
directoryServiceBean - The bean containing the configurationbaseDirectory - The working path for this DirectoryServiceExceptionpublic static MavibotPartition createMavibotPartition(DirectoryService directoryService, MavibotPartitionBean mvbtPartitionBean) throws ConfigurationException
ConfigurationExceptionpublic static MavibotIndex<?> createMavibotIndex(MavibotPartition partition, MavibotIndexBean mavobotIndexBean, DirectoryService directoryService)
MavibotIndexBean - The MavibotIndexBean to convertException - If the instance cannot be createdCopyright © 2021. All rights reserved.