Package loci.tests.testng
Class ConfigurationTree
java.lang.Object
loci.tests.testng.ConfigurationTree
Stores configuration data about files in a directory structure.
This class is not designed to be thread safe, so should be synchronized
externally for proper thread safety.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationTree(String rootDir) Constructs a new configuration tree rooted at the given directory in the file system.ConfigurationTree(String rootDir, String configDir) Constructs a new configuration tree rooted at the given directory in the file system with a custom configuration directory.ConfigurationTree(String rootDir, String configDir, String cacheDir) Constructs a new configuration tree rooted at the given directory in the file system with a custom configuration directory anc cache directory. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the Configuration object corresponding to the given file.Returns the base directory holding the configuration filesReturns the base directory holding the configuration filesReturns the toot directory holding the datavoidparseConfigFile(String configFile) Relocate a path from an base directory into a target directoryrelocateToConfig(String path) Relocate a path under the root directory to the configuration directoryrelocateToRoot(String path) Relocate a path under the configuration directory to the root directory
-
Constructor Details
-
ConfigurationTree
Constructs a new configuration tree rooted at the given directory in the file system.- Parameters:
rootDir- a string specifying the root directory
-
ConfigurationTree
Constructs a new configuration tree rooted at the given directory in the file system with a custom configuration directory.- Parameters:
rootDir- a string specifying the root directoryconfigDir- a string specifying the base configuration directory
-
ConfigurationTree
Constructs a new configuration tree rooted at the given directory in the file system with a custom configuration directory anc cache directory.- Parameters:
rootDir- a string specifying the root directoryconfigDir- a string specifying the base configuration directorycacheDir- a string specifying the cache directory
-
-
Method Details
-
getRootDirectory
Returns the toot directory holding the data -
getConfigDirectory
Returns the base directory holding the configuration files -
getCacheDirectory
Returns the base directory holding the configuration files -
relocate
Relocate a path from an base directory into a target directory -
relocateToConfig
Relocate a path under the root directory to the configuration directory -
relocateToRoot
Relocate a path under the configuration directory to the root directory -
get
Retrieves the Configuration object corresponding to the given file.- Throws:
IOException
-
parseConfigFile
- Throws:
IOException
-