public class JomcToolTask extends JomcModelTask
Type | Property and Description |
---|---|
KeyValueType |
createVelocity
Creates a new
velocityProperty element instance. |
createTransformationOutputProperty
Constructor and Description |
---|
JomcToolTask()
Creates a new
JomcToolTask instance. |
Modifier and Type | Method and Description |
---|---|
JomcToolTask |
clone()
Creates and returns a copy of this object.
|
void |
configureJomcTool(JomcTool tool)
Configures a given
JomcTool instance using the properties of the instance. |
LocaleType |
createLocale()
Creates a new
locale element instance. |
KeyValueType |
createTemplateParameter()
Creates a new
templateParameter element instance. |
PropertiesResourceType |
createTemplateParameterResource()
Creates a new
templateParameterResource element instance. |
KeyValueType |
createVelocityProperty()
Creates a new
velocityProperty element instance. |
PropertiesResourceType |
createVelocityPropertyResource()
Creates a new
velocityPropertyResource element instance. |
String |
getDefaultTemplateEncoding()
Gets the encoding to use for reading templates.
|
String |
getDefaultTemplateProfile()
Gets the default template profile to use when accessing templates.
|
String |
getImplementation()
Gets the identifier of an implementation to process.
|
Implementation |
getImplementation(Model model)
Gets the implementation to process from a given model.
|
String |
getIndentation()
Gets the indentation string ('\t' for tab).
|
String |
getInputEncoding()
Gets the encoding to use for reading files.
|
String |
getLineSeparator()
Gets the line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix).
|
LocaleType |
getLocale()
Gets the locale.
|
String |
getModule()
Gets the identifier of a module to process.
|
Module |
getModule(Model model)
Gets the module to process from a given model.
|
String |
getOutputEncoding()
Gets the encoding to use for writing files.
|
String |
getSpecification()
Gets the identifier of a specification to process.
|
Specification |
getSpecification(Model model)
Gets the specification to process from a given model.
|
String |
getTemplateEncoding()
Deprecated.
As of JOMC 1.3, replaced by method
getDefaultTemplateEncoding() . This method will be removed
in JOMC 2.0. |
String |
getTemplateLocation()
Gets the location to search for templates in addition to searching the class path of the task.
|
List<PropertiesResourceType> |
getTemplateParameterResources()
Gets the template parameter resources to apply.
|
List<KeyValueType> |
getTemplateParameters()
Gets the template parameters to apply.
|
String |
getTemplateProfile()
Gets the template profile to use when accessing templates.
|
List<KeyValueType> |
getVelocityProperties()
Gets the Velocity runtime properties to apply.
|
List<PropertiesResourceType> |
getVelocityPropertyResources()
Gets the Velocity runtime property resources to apply.
|
boolean |
isModulesProcessingRequested()
Gets a flag indicating all modules are requested to be processed.
|
void |
postExecuteTask()
Called by the
execute method after the preExecuteTask /executeTask methods even if those
methods threw an exception. |
void |
preExecuteTask()
Called by the
execute method prior to the executeTask method. |
void |
setDefaultTemplateEncoding(String value)
Sets the encoding to use for reading templates.
|
void |
setDefaultTemplateProfile(String value)
Sets the default template profile to use when accessing templates.
|
void |
setImplementation(String value)
Sets the identifier of an implementation to process.
|
void |
setIndentation(String value)
Sets the indentation string ('\t' for tab).
|
void |
setInputEncoding(String value)
Sets the encoding to use for reading files.
|
void |
setLineSeparator(String value)
Sets the line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix).
|
void |
setModule(String value)
Sets the identifier of a module to process.
|
void |
setOutputEncoding(String value)
Sets the encoding to use for writing files.
|
void |
setSpecification(String value)
Sets the identifier of a specification to process.
|
void |
setTemplateEncoding(String value)
Deprecated.
As of JOMC 1.3, replaced by method
setDefaultTemplateEncoding(java.lang.String) . This method
will be removed in JOMC 2.0. |
void |
setTemplateLocation(String value)
Sets the location to search for templates in addition to searching the class path of the task.
|
void |
setTemplateProfile(String value)
Sets the template profile to use when accessing templates.
|
createModuleResource, getModel, getModuleLocation, getModuleResources, getTransformerLocation, isJavaValidationEnabled, isModelObjectClasspathResolutionEnabled, isModelResourceValidationEnabled, newModelContext, setJavaValidationEnabled, setModelObjectClasspathResolutionEnabled, setModelResourceValidationEnabled, setModuleLocation, setTransformerLocation
assertKeysNotNull, assertLocationsNotNull, assertNamesNotNull, assertNotNull, createClasspath, createModelContextAttribute, createTransformationOutputProperty, createTransformationParameter, createTransformationParameterResource, execute, executeTask, getClasspath, getDirectory, getIf, getModel, getModelContextAttributes, getModelContextFactoryClassName, getModletLocation, getModletSchemaSystemId, getPlatformProviderLocation, getProperties, getProviderLocation, getResource, getResources, getTransformationOutputProperties, getTransformationParameterResources, getTransformationParameters, getTransformer, getUnless, isModelProcessingEnabled, isModletResourceValidationEnabled, logMessage, logMessage, logSeparator, logValidationReport, newProjectClassLoader, setClasspath, setClasspathRef, setIf, setModel, setModelContextFactoryClassName, setModelProcessingEnabled, setModletLocation, setModletResourceValidationEnabled, setModletSchemaSystemId, setPlatformProviderLocation, setProviderLocation, setUnless
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
velocityProperty
element instance.velocityProperty
element instance.getVelocityProperties()
public JomcToolTask()
JomcToolTask
instance.public final String getInputEncoding()
null
.setInputEncoding(java.lang.String)
public final void setInputEncoding(String value)
value
- The new encoding to use for reading files or null
.getInputEncoding()
public final String getOutputEncoding()
null
.setOutputEncoding(java.lang.String)
public final void setOutputEncoding(String value)
value
- The new encoding to use for writing files or null
.getOutputEncoding()
@Deprecated public final String getTemplateEncoding()
getDefaultTemplateEncoding()
. This method will be removed
in JOMC 2.0.null
.setTemplateEncoding(java.lang.String)
@Deprecated public final void setTemplateEncoding(String value)
setDefaultTemplateEncoding(java.lang.String)
. This method
will be removed in JOMC 2.0.value
- The new encoding to use for reading templates or null
.getTemplateEncoding()
public final String getDefaultTemplateEncoding()
null
.setDefaultTemplateEncoding(java.lang.String)
public final void setDefaultTemplateEncoding(String value)
value
- The new encoding to use for reading templates or null
.getDefaultTemplateEncoding()
public final String getTemplateLocation()
null
.setTemplateLocation(java.lang.String)
public final void setTemplateLocation(String value)
value
- The new location to search for templates in addition to searching the class path of the task or
null
.getTemplateLocation()
public final String getDefaultTemplateProfile()
null
.setDefaultTemplateProfile(java.lang.String)
public final void setDefaultTemplateProfile(String value)
value
- The new default template profile to use when accessing templates or null
.getDefaultTemplateProfile()
public final String getTemplateProfile()
null
.setTemplateProfile(java.lang.String)
public final void setTemplateProfile(String value)
value
- The new template profile to use when accessing templates or null
.getTemplateProfile()
public final String getIndentation()
null
.setIndentation(java.lang.String)
public final void setIndentation(String value)
value
- The new indentation string ('\t' for tab) or null
.getIndentation()
public final String getLineSeparator()
null
.setLineSeparator(java.lang.String)
public final void setLineSeparator(String value)
value
- The new line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix) or null
.getLineSeparator()
public final LocaleType getLocale()
null
.createLocale()
public LocaleType createLocale()
locale
element instance.locale
element instance.org.apache.tools.ant.BuildException
- if a value already has been created.getLocale()
public final String getSpecification()
null
.setSpecification(java.lang.String)
public final void setSpecification(String value)
value
- The new identifier of a specification to process or null
.getSpecification()
public final Specification getSpecification(Model model)
model
- The model to get the specification to process from.null
.NullPointerException
- if model
is null
.getSpecification()
public final String getImplementation()
null
.setImplementation(java.lang.String)
public final void setImplementation(String value)
value
- The new identifier of an implementation to process or null
.getImplementation()
public final Implementation getImplementation(Model model)
model
- The model to get the implementation to process from.null
.NullPointerException
- if model
is null
.getImplementation()
public final String getModule()
null
.setModule(java.lang.String)
public final void setModule(String value)
value
- The new identifier of a module to process or null
.getModule()
public final Module getModule(Model model)
model
- The model to get the module to process from.null
.NullPointerException
- if model
is null
.getModule()
public boolean isModulesProcessingRequested()
true
, if processing of all modules is requested; false
, else.getSpecification()
,
getImplementation()
,
getModule()
public final List<KeyValueType> getVelocityProperties()
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make
to the returned list will be present inside the object. This is why there is no set
method for the
velocity properties property.
createVelocityProperty()
public KeyValueType createVelocityProperty()
velocityProperty
element instance.velocityProperty
element instance.getVelocityProperties()
public final List<PropertiesResourceType> getVelocityPropertyResources()
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make
to the returned list will be present inside the object. This is why there is no set
method for the
velocity property resources property.
createVelocityPropertyResource()
public PropertiesResourceType createVelocityPropertyResource()
velocityPropertyResource
element instance.velocityPropertyResource
element instance.getVelocityPropertyResources()
public final List<KeyValueType> getTemplateParameters()
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make
to the returned list will be present inside the object. This is why there is no set
method for the
template parameters property.
createTemplateParameter()
public KeyValueType createTemplateParameter()
templateParameter
element instance.templateParameter
element instance.getTemplateParameters()
public final List<PropertiesResourceType> getTemplateParameterResources()
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make
to the returned list will be present inside the object. This is why there is no set
method for the
template parameter resources property.
createTemplateParameterResource()
public PropertiesResourceType createTemplateParameterResource()
templateParameterResource
element instance.templateParameterResource
element instance.getTemplateParameterResources()
public void preExecuteTask() throws org.apache.tools.ant.BuildException
execute
method prior to the executeTask
method.preExecuteTask
in class JomcModelTask
org.apache.tools.ant.BuildException
- if execution fails.JomcTask.execute()
public void postExecuteTask() throws org.apache.tools.ant.BuildException
execute
method after the preExecuteTask
/executeTask
methods even if those
methods threw an exception.postExecuteTask
in class JomcTask
org.apache.tools.ant.BuildException
- if execution fails.JomcTask.execute()
public void configureJomcTool(JomcTool tool) throws org.apache.tools.ant.BuildException
JomcTool
instance using the properties of the instance.tool
- The tool to configure.NullPointerException
- if tool
is null
.org.apache.tools.ant.BuildException
- if configuring tool
fails.public JomcToolTask clone()
clone
in class JomcModelTask
Copyright © 2005-2013 The JOMC Project. All Rights Reserved.