Class Maven2ProjectPaths
java.lang.Object
org.apache.torque.generator.configuration.paths.Maven2ProjectPaths
- All Implemented Interfaces:
ProjectPaths
- Direct Known Subclasses:
Maven2DirectoryProjectPaths,Maven2JarProjectPaths
Contains information of the default integration of the Torque generator
into a maven 2 project.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringDefault cache directory.protected static final StringDefault configuration root directory, relative to the project root.protected static final StringDefault generation target directory, relative to the project root.static final StringDefault generation target directory for generated files which are modifiable by the user, relative to the project root.static final StringKey for the target directory for generated files which are modifiable by the user, relative to the project root.protected static final StringDefault generation source file directory, relative to the configuration root directory.protected static final StringDefault working directory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the default cache subdirectory where the torque generator can store internal files.abstract StringReturns the package of the Torque generator configuration.abstract FileReturns the path to the Torque generator configuration directory.Returns the path to the source files.getOutputDirectory(String outputDirKey) Returns the output directory for a given output directory key.Returns the output directory map which contains the mapping from output directory key to output directory.protected Filereturns the root directory of the whole maven 2 project.Returns the default work subdirectory where the torque generator can store internal files.
-
Field Details
-
CONFIG_DIR
Default configuration root directory, relative to the project root.- See Also:
-
SOURCE_DIR
Default generation source file directory, relative to the configuration root directory.- See Also:
-
MODIFIABLE_OUTPUT_DIR_KEY
Key for the target directory for generated files which are modifiable by the user, relative to the project root.- See Also:
-
MODIFIABLE_OUTPUT_DIR
Default generation target directory for generated files which are modifiable by the user, relative to the project root.- See Also:
-
DEFAULT_OUTPUT_DIR
Default generation target directory, relative to the project root.- See Also:
-
WORK_DIR
Default working directory.- See Also:
-
CACHE_DIR
Default cache directory.- See Also:
-
-
Constructor Details
-
Maven2ProjectPaths
Constructor.- Parameters:
projectRoot- path to the project root directory, not null. The path must either be absolute or relative to the current working directory.- Throws:
NullPointerException- if projectRoot is null.
-
-
Method Details
-
getConfigurationPath
Description copied from interface:ProjectPathsReturns the path to the Torque generator configuration directory. The path must either be absolute or relative to the current working directory.- Specified by:
getConfigurationPathin interfaceProjectPaths- Returns:
- the path to the Torque generator configuration; may (but must not) be null if no configuration is contained in the surrounding project; must be null if the configuration is read from the class path.
-
getConfigurationPackage
Description copied from interface:ProjectPathsReturns the package of the Torque generator configuration.- Specified by:
getConfigurationPackagein interfaceProjectPaths- Returns:
- the package to the Torque generator configuration. Must be null if the configuration is read from the file system or from a jar file. Must not be null if the configuration is read from the class path.
-
getDefaultSourcePath
Returns the path to the source files.- Specified by:
getDefaultSourcePathin interfaceProjectPaths- Returns:
- the path to for the source files, not null.
-
getOutputDirectoryMap
Returns the output directory map which contains the mapping from output directory key to output directory.- Specified by:
getOutputDirectoryMapin interfaceProjectPaths- Returns:
- the unmodifiable output directory map, not null. Contains a mapping for the keys null and "modifiable".
- Throws:
IllegalStateException- if the current state of the object is not valid.
-
getOutputDirectory
Returns the output directory for a given output directory key.- Specified by:
getOutputDirectoryin interfaceProjectPaths- Parameters:
outputDirKey- the output directory key, or null for the default output directory.- Returns:
- the output directory for the key, relative to the current directory, or absolute, not null.
- Throws:
IllegalArgumentException- if the outputDirKey is unknown.
-
getWorkDirectory
Returns the default work subdirectory where the torque generator can store internal files.- Specified by:
getWorkDirectoryin interfaceProjectPaths- Returns:
- the work subdirectory, not null.
-
getCacheDirectory
Returns the default cache subdirectory where the torque generator can store internal files.- Specified by:
getCacheDirectoryin interfaceProjectPaths- Returns:
- the work subdirectory, not null.
-
getProjectRoot
returns the root directory of the whole maven 2 project.- Returns:
- the root directory of the whole project, not null.
-