public class CustomProjectPaths extends Object implements ProjectPaths
| Constructor and Description |
|---|
CustomProjectPaths(File configurationDir,
String configurationPackage,
File sourceDir,
Map<String,File> outputDirectoryMap,
File workDir,
File cacheDir)
Constructor.
|
CustomProjectPaths(ProjectPaths toCopy)
Copy-constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkInit()
Checks whether the current settings are valid.
|
File |
getCacheDirectory()
Returns the cache directory where the torque generator can store
internal files, relative to the project root.
|
String |
getConfigurationPackage()
Returns the root package of the Torque generator files.
|
File |
getConfigurationPath()
Returns the root directory for the Torque generator files,
relative to the project root.
|
File |
getDefaultSourcePath()
Returns the default directory for the source files,
relative to the project root.
|
File |
getOutputDirectory(String outputDirKey)
Returns the output directory for a given output directory key.
|
Map<String,File> |
getOutputDirectoryMap()
Returns the output directory map which contains the mapping
from output directory key to output directory.
|
File |
getWorkDirectory()
Returns the work directory where the torque generator can store
internal files, relative to the project root.
|
void |
setCacheDir(File cacheDir)
Sets the cache directory where the torque generator can store
internal files, relative to the current directory, or absolute.
|
void |
setConfigurationDir(File configurationDir)
Sets the root directory for the Torque generator configuration files,
absolute or relative to the project root.
|
void |
setConfigurationPackage(String configurationPackage)
Sets the root package for the Torque generator files,
relative to the project root.
|
void |
setOutputDirectory(String outputDirKey,
File outputDir)
Sets the output directory for a given output directory key.
|
void |
setOutputDirectoryMap(Map<String,File> outputDirectoryMap)
Sets the contents of the output directory map.
|
void |
setSourceDir(File sourceDir)
Sets the default directory for the source files,
relative to the current directory, or absolute.
|
void |
setWorkDir(File workDir)
Sets the work directory where the torque generator can store
internal files, relative to the current directory, or absolute.
|
String |
toString() |
public CustomProjectPaths(ProjectPaths toCopy)
toCopy - the default project paths to copy, not null.NullPointerException - if toCopy is null.public CustomProjectPaths(File configurationDir, String configurationPackage, File sourceDir, Map<String,File> outputDirectoryMap, File workDir, File cacheDir)
configurationDir - the configuration directory for the Torque
generator configuration files, or null if the configuration files
are loaded from the classpath.configurationPackage - the package containing the Torque
generator configuration files, or null if the configuration files
are loaded from the file system.sourceDir - the default directory for the source files, or null.outputDirectoryMap - The output directories for the files,
keyed by the output directory key. The directory with the key
null is the default output directory.workDir - work directory where the torque generator can store
internal files.cacheDir - cache directory where the torque generator can store
internal files.public void setConfigurationDir(File configurationDir)
configurationDir - the configuration directory for the Torque
generator configuration files, null to invalidate the current
setting.public void setConfigurationPackage(String configurationPackage)
configurationPackage - the configuration root package
for the Torque generator files.public void setSourceDir(File sourceDir)
sourceDir - the default directory for the source files,
null to invalidate the current setting.public void setOutputDirectory(String outputDirKey, File outputDir)
outputDirKey - the output directory key, or null for the default
output directory.outputDir - the output directory for the key,
relative to the current directory, or absolute.
Use null to remove the output directory for the key.public void setOutputDirectoryMap(Map<String,File> outputDirectoryMap)
outputDirectoryMap - the new output directory map.public void setWorkDir(File workDir)
workDir - the work directory for internal files,
null to invalidate the current setting.public void setCacheDir(File cacheDir)
cacheDir - the cache directory for internal files,
null to invalidate the current setting.public File getConfigurationPath()
getConfigurationPath in interface ProjectPathsIllegalStateException - if one of the required parameters
is not set.public String getConfigurationPackage()
getConfigurationPackage in interface ProjectPathsIllegalStateException - if one of the required parameters
is not set.public File getDefaultSourcePath()
getDefaultSourcePath in interface ProjectPathsIllegalStateException - if one of the required parameters
is not set.public File getOutputDirectory(String outputDirKey)
getOutputDirectory in interface ProjectPathsoutputDirKey - the output directory key, or null for the default
output directory.IllegalStateException - if one of the required parameters
is not set.IllegalArgumentException - if the outputDirKey is unknown.public Map<String,File> getOutputDirectoryMap()
getOutputDirectoryMap in interface ProjectPathsIllegalStateException - if one of the required parameters
is not set.public File getWorkDirectory()
getWorkDirectory in interface ProjectPathsIllegalStateException - if one of the required parameters
is not set.public File getCacheDirectory()
getCacheDirectory in interface ProjectPathsIllegalStateException - if one of the required parameters
is not set.public void checkInit()
IllegalStateException - if the current settings are valid, false otherwise.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.