com.ca.jcs.cfg.apacheds.schema
Class FileSystemSchemaLoader

java.lang.Object
  extended by com.ca.jcs.cfg.apacheds.schema.FileSystemSchemaLoader
All Implemented Interfaces:
SchemaLoader

public class FileSystemSchemaLoader
extends Object
implements SchemaLoader

Allows a filesystem directory name can be specified, in which case it will be scanned for OpenLDAP formatted .schema files and their contents returned. This is a more dynamic alternative (but works in addition to) the scheme were schemas are built into the release via the Maven2 plug-in.


Constructor Summary
FileSystemSchemaLoader()
          Calls FileSystemSchemaLoader(null, (String)null).
FileSystemSchemaLoader(String directoryName, List fileNames)
          Loads named files under the specified directory in strict order.
FileSystemSchemaLoader(String directoryName, String fileNameRegex)
          Loads all files in specified directory that match the specified regex, after they have been sort alphabetically.
 
Method Summary
 String getDirectoryName()
           
 Collection loadSchemas(StartupConfiguration startupConfiguration, Registries registries)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemSchemaLoader

public FileSystemSchemaLoader()
Calls FileSystemSchemaLoader(null, (String)null).


FileSystemSchemaLoader

public FileSystemSchemaLoader(String directoryName,
                              String fileNameRegex)
Loads all files in specified directory that match the specified regex, after they have been sort alphabetically. Note that you must ensure, using lexicographical ordering, that schema files are loaded before any files that are dependant on them.

Parameters:
directoryName - Directory to be read, if null the "./" will be used.
fileNameRegex - Regular expression which file names need to match, if null then ".*_openldap.schema" will be used.

FileSystemSchemaLoader

public FileSystemSchemaLoader(String directoryName,
                              List fileNames)
Loads named files under the specified directory in strict order.

Parameters:
directoryName - Directory to be read, if null the "./" will be used.
fileNames - Names of files under directoryName to load, in order (a schema file must appear before any files that are dependant on it).
Method Detail

getDirectoryName

public String getDirectoryName()

loadSchemas

public Collection loadSchemas(StartupConfiguration startupConfiguration,
                              Registries registries)
Specified by:
loadSchemas in interface SchemaLoader


Created 2011-07-14 13:27 EST