Class SimpleDirectoryServiceFactory
- java.lang.Object
-
- com.atlassian.confluence.it.usermanagement.SimpleDirectoryServiceFactory
-
- All Implemented Interfaces:
org.apache.directory.server.core.factory.DirectoryServiceFactory
public final class SimpleDirectoryServiceFactory extends Object implements org.apache.directory.server.core.factory.DirectoryServiceFactory
An implementation ofDirectoryServiceFactory
which doesn't suffer from DIRSERVER-1504, where the schema LDIF files can fail to be extracted when the java.class.path system property is not set to a meaningful value.It is basically a simplified version of
DefaultDirectoryServiceFactory
, with a bunch of unnecessary configuration removed and custom handling for extracting schema files from the classpath to work around DIRSERVER-1504. The custom logic is the methodextractSchemaResources(String)
, which uses Spring's resource utilities to load the LDIF files from the classpath reliably.
-
-
Constructor Summary
Constructors Constructor Description SimpleDirectoryServiceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.directory.server.core.api.DirectoryService
getDirectoryService()
org.apache.directory.server.core.factory.PartitionFactory
getPartitionFactory()
void
init(String name)
-
-
-
Method Detail
-
init
public void init(String name) throws Exception
- Specified by:
init
in interfaceorg.apache.directory.server.core.factory.DirectoryServiceFactory
- Throws:
Exception
-
getDirectoryService
public org.apache.directory.server.core.api.DirectoryService getDirectoryService() throws Exception
- Specified by:
getDirectoryService
in interfaceorg.apache.directory.server.core.factory.DirectoryServiceFactory
- Throws:
Exception
-
-