com.atlassian.confluence.it.usermanagement
Class SimpleDirectoryServiceFactory

java.lang.Object
  extended by 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 of DirectoryServiceFactory 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 method extractSchemaResources(String), which uses Spring's resource utilities to load the LDIF files from the classpath reliably.


Constructor Summary
SimpleDirectoryServiceFactory()
           
 
Method Summary
 org.apache.directory.server.core.DirectoryService getDirectoryService()
          
 org.apache.directory.server.core.factory.PartitionFactory getPartitionFactory()
          
 void init(String name)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDirectoryServiceFactory

public SimpleDirectoryServiceFactory()
Method Detail

init

public void init(String name)
          throws Exception

Specified by:
init in interface org.apache.directory.server.core.factory.DirectoryServiceFactory
Throws:
Exception

getDirectoryService

public org.apache.directory.server.core.DirectoryService getDirectoryService()
                                                                      throws Exception

Specified by:
getDirectoryService in interface org.apache.directory.server.core.factory.DirectoryServiceFactory
Throws:
Exception

getPartitionFactory

public org.apache.directory.server.core.factory.PartitionFactory getPartitionFactory()
                                                                              throws Exception

Specified by:
getPartitionFactory in interface org.apache.directory.server.core.factory.DirectoryServiceFactory
Throws:
Exception


Copyright © 2003-2012 Atlassian. All Rights Reserved.