Klasse UnitConfiguration
java.lang.Object
org.apache.torque.generator.configuration.UnitConfiguration
Contains all information to run a generation unit.
Provides state checking, i.e. getters can only be called
after all setters has been called.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the cache directory where the generator can store internal files.Returns the class loader to use by the generator when accessing the templates or classes defined within the templates.Returns the configuration handlers used to parse the configuration of this generation unit.Returns the output CharSet if no specific encoding has been set in the output.Returns the entityReferences of the associated configuration unit.Returns the Loglevel during generation.Returns the options of the associated configuration unit.Returns the configuration of the outlets in this generation unit.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.Returns the list of output definitions of the associated configuration unit.Returns the source provider which overrides the source provider defined in the control file.Returns the name of the template set.Returns the work directory where the generator can store internal files.boolean
Returns whether to add debug information to the output.boolean
isInit()
Checks whether the unit configuration is fully initialized.boolean
Returns true if only the sources should be processed which have changed since last generation.void
setAddDebuggingInfoToOutput
(boolean addDebuggingInfoToOutput) Sets whether to add debug information to the output.void
setCacheDirectory
(File cacheDirectory) Sets the cache directory where the generator can store internal files.void
setClassLoader
(ClassLoader classLoader) Sets the class loader to use by the generator when accessing the templates or classes defined within the templates.void
setConfigurationHandlers
(ConfigurationHandlers configurationHandlers) Sets the configuration handlers used to parse the configuration of this generation unit.void
setDefaultOutputEncoding
(Charset defaultOutputCharset) Sets the output encoding if no specificdefaultOutputCharsetg has been set in the output.void
setEntityReferences
(EntityReferences entityReferences) Sets the entityReferences of the associated configuration unit.void
setLoglevel
(Loglevel loglevel) Sets the Loglevel during generation.void
setOptions
(Options options) Sets the options of the associated configuration unit.void
setOutletConfiguration
(OutletConfiguration outletConfiguration) Sets the outlet configuration of the associated configuration unit.void
setOutputDirectoryMap
(Map<String, File> outputDirectoryMap) Sets the output directory map which contains the mapping from output directory key to output directory.void
setOutputList
(List<Output> outputList) Sets the output activities of the associated configuration unit.void
setOverrideSourceProvider
(SourceProvider overrideSourceProvider) Sets the source provider which overrides the source provider defined in the control file.void
setRunOnlyOnSourceChange
(boolean runOnlyOnSourceChange) Sets whether only the sources should be processed which have changed since last generation.void
setTemplateSetName
(String name) Sets the name of the template set.void
setWorkDirectory
(File workDirectory) Sets the work directory where the generator can store internal files.toString()
-
Konstruktordetails
-
UnitConfiguration
public UnitConfiguration()
-
-
Methodendetails
-
getOutletConfiguration
Returns the configuration of the outlets in this generation unit.- Gibt zurück:
- the outlet configuration, not null.
- Löst aus:
IllegalStateException
- if outletConfiguration was not set.
-
setOutletConfiguration
Sets the outlet configuration of the associated configuration unit.- Parameter:
outletConfiguration
- the outlet configuration, not null.- Löst aus:
NullPointerException
- if outletConfiguration is null.
-
getOptions
Returns the options of the associated configuration unit.- Gibt zurück:
- the options, not null.
- Löst aus:
IllegalStateException
- if options were not yet set.
-
setOptions
Sets the options of the associated configuration unit.- Parameter:
options
- the options, not null.- Löst aus:
NullPointerException
- if options is null.
-
getOutputDirectory
Returns the output directory for a given output directory key.- Parameter:
outputDirKey
- the key which output directory should be returned. Null represents the default output directory and is always mapped to a non-null value.- Gibt zurück:
- the output directory for the key, not null.
- Löst aus:
IllegalStateException
- if the default output directory was not yet set.
-
getOutputDirectoryMap
Returns the output directory map which contains the mapping from output directory key to output directory.- Gibt zurück:
- the immutable output directory map, not null, contains at least a mapping for the key null.
- Löst aus:
IllegalStateException
- if no mapping is contained for the key null.
-
setOutputDirectoryMap
Sets the output directory map which contains the mapping from output directory key to output directory.- Parameter:
outputDirectoryMap
- the new output directory map, must contain at least a mapping for the key null.- Löst aus:
NullPointerException
- if outputDirectoryMap is null.IllegalStateException
- if the target directory was not yet set.
-
getWorkDirectory
Returns the work directory where the generator can store internal files.- Gibt zurück:
- the directory where the generator can store internal files, not null.
- Löst aus:
IllegalStateException
- if the target directory was not yet set.
-
setWorkDirectory
Sets the work directory where the generator can store internal files.- Parameter:
workDirectory
- the work directory, not null.- Löst aus:
NullPointerException
- if workDirectory is null.
-
getCacheDirectory
Returns the cache directory where the generator can store internal files.- Gibt zurück:
- the directory where the generator can store internal files, not null.
- Löst aus:
IllegalStateException
- if the target directory was not yet set.
-
setCacheDirectory
Sets the cache directory where the generator can store internal files.- Parameter:
cacheDirectory
- the work directory, not null.- Löst aus:
NullPointerException
- if workDirectory is null.
-
setOutputList
Sets the output activities of the associated configuration unit.- Parameter:
outputList
- the output activities, not null.- Löst aus:
NullPointerException
- if outputFiles is null.
-
getOutputList
Returns the list of output definitions of the associated configuration unit.- Gibt zurück:
- the output definitions, not null.
- Löst aus:
IllegalStateException
- if the output definitions were not yet set.
-
getLoglevel
Returns the Loglevel during generation.- Gibt zurück:
- the Loglevel, not null.
- Löst aus:
IllegalStateException
- if the loglevel is not yet set.
-
setLoglevel
Sets the Loglevel during generation.- Parameter:
loglevel
- the Loglevel, not null.- Löst aus:
NullPointerException
- if loglevel is set to null.
-
isAddDebuggingInfoToOutput
public boolean isAddDebuggingInfoToOutput()Returns whether to add debug information to the output.- Gibt zurück:
- true if debug information should be added, false otherwise.
-
setAddDebuggingInfoToOutput
public void setAddDebuggingInfoToOutput(boolean addDebuggingInfoToOutput) Sets whether to add debug information to the output.- Parameter:
addDebuggingInfoToOutput
- true if debug information should be added, false otherwise.
-
getConfigurationHandlers
Returns the configuration handlers used to parse the configuration of this generation unit.- Gibt zurück:
- the configuration handlers, not null.
- Löst aus:
IllegalStateException
- if configurationHandlers was not set.
-
setConfigurationHandlers
Sets the configuration handlers used to parse the configuration of this generation unit.- Parameter:
configurationHandlers
- the configuration handlers, not null.- Löst aus:
NullPointerException
- if configurationHandlers is null.
-
getOverrideSourceProvider
Returns the source provider which overrides the source provider defined in the control file.- Gibt zurück:
- the overriding source provider, or null to use the source provider defined in the control file.
- Löst aus:
NullPointerException
- if overrideSourceFileset was not yet set.
-
setOverrideSourceProvider
Sets the source provider which overrides the source provider defined in the control file.- Parameter:
overrideSourceProvider
- the override source provider, or null to use the source provider defined in the control file.
-
getEntityReferences
Returns the entityReferences of the associated configuration unit.- Gibt zurück:
- the entityReferences, not null.
- Löst aus:
IllegalStateException
- if entityReferences were not yet set.
-
setEntityReferences
Sets the entityReferences of the associated configuration unit.- Parameter:
entityReferences
- the entityReferences, not null.- Löst aus:
NullPointerException
- if entityReferences is null.
-
getDefaultOutputEncoding
Returns the output CharSet if no specific encoding has been set in the output.- Gibt zurück:
- the default output encoding, null for the default platform encoding.
-
setDefaultOutputEncoding
Sets the output encoding if no specificdefaultOutputCharsetg has been set in the output.- Parameter:
defaultOutputCharset
- the default output encoding, null for the default platform encoding.
-
getClassLoader
Returns the class loader to use by the generator when accessing the templates or classes defined within the templates.- Gibt zurück:
- the class loader for the templates, or null if the standard class loader of the torque generator classes is used.
-
setClassLoader
Sets the class loader to use by the generator when accessing the templates or classes defined within the templates.- Parameter:
classLoader
- the class loader for the templates, or null if the standard class loader of the torque generator classes should be used.
-
isRunOnlyOnSourceChange
public boolean isRunOnlyOnSourceChange()Returns true if only the sources should be processed which have changed since last generation.- Gibt zurück:
- false if the controller should be run irrespective of changes in the source files, true if the controller should be run for source files which have changed during last generation.
-
setRunOnlyOnSourceChange
public void setRunOnlyOnSourceChange(boolean runOnlyOnSourceChange) Sets whether only the sources should be processed which have changed since last generation.- Parameter:
runOnlyOnSourceChange
- false if the controller should be run irrespective of changes in the source files, true if the controller should be run for source files which have changed during last generation.
-
getTemplateSetName
Returns the name of the template set.- Gibt zurück:
- the name of the template set.
-
setTemplateSetName
Sets the name of the template set.- Parameter:
name
- the name of the template set.
-
isInit
public boolean isInit()Checks whether the unit configuration is fully initialized.- Gibt zurück:
- true if the unit configuration is fully initialized, false otherwise.
-
toString
-