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 java.lang.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(java.lang.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(java.lang.String name)
          throws java.lang.Exception

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

getDirectoryService

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

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

getPartitionFactory

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

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


Copyright © 2003-2014 Atlassian. All Rights Reserved.