public class JomcModelTask extends JomcTask
createTransformationOutputProperty
Constructor and Description |
---|
JomcModelTask()
Creates a new
JomcModelTask instance. |
Modifier and Type | Method and Description |
---|---|
JomcModelTask |
clone()
Creates and returns a copy of this object.
|
ModuleResourceType |
createModuleResource()
Creates a new
moduleResource element instance. |
Model |
getModel(ModelContext context)
Gets a
Model from a given ModelContext . |
String |
getModuleLocation()
Gets the location searched for modules.
|
Set<ModuleResourceType> |
getModuleResources()
Gets a set of module resources.
|
String |
getTransformerLocation()
Gets the location searched for transformers.
|
boolean |
isJavaValidationEnabled()
Gets a flag indicating Java validation is enabled.
|
boolean |
isModelObjectClasspathResolutionEnabled()
Gets a flag indicating model object class path resolution is enabled.
|
boolean |
isModelResourceValidationEnabled()
Gets a flag indicating JAXP schema validation of model resources is enabled.
|
ModelContext |
newModelContext(ClassLoader classLoader)
Creates a new
ModelContext instance using a given class loader. |
void |
preExecuteTask()
Called by the
execute method prior to the executeTask method. |
void |
setJavaValidationEnabled(boolean value)
Sets the flag indicating Java validation is enabled.
|
void |
setModelObjectClasspathResolutionEnabled(boolean value)
Sets the flag indicating model object class path resolution is enabled.
|
void |
setModelResourceValidationEnabled(boolean value)
Sets the flag indicating JAXP schema validation of model resources is enabled.
|
void |
setModuleLocation(String value)
Sets the location to search for modules.
|
void |
setTransformerLocation(String value)
Sets the location to search for transformers.
|
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, postExecuteTask, 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
public JomcModelTask()
JomcModelTask
instance.public final String getModuleLocation()
null
.setModuleLocation(java.lang.String)
public final void setModuleLocation(String value)
value
- The new location to search for modules or null
.getModuleLocation()
public final String getTransformerLocation()
null
.setTransformerLocation(java.lang.String)
public final void setTransformerLocation(String value)
value
- The new location to search for transformers or null
.getTransformerLocation()
public final boolean isModelObjectClasspathResolutionEnabled()
true
, if model object class path resolution is enabled; false
, else.setModelObjectClasspathResolutionEnabled(boolean)
public final void setModelObjectClasspathResolutionEnabled(boolean value)
value
- true
, to enable model object class path resolution; false
, to disable model object
class path resolution.isModelObjectClasspathResolutionEnabled()
public Set<ModuleResourceType> getModuleResources()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
module resources property.
createModuleResource()
public ModuleResourceType createModuleResource()
moduleResource
element instance.moduleResource
element instance.getModuleResources()
public final boolean isModelResourceValidationEnabled()
true
, if JAXP schema validation of model resources is enabled; false
, else.setModelResourceValidationEnabled(boolean)
public final void setModelResourceValidationEnabled(boolean value)
value
- true
, to enable JAXP schema validation of model resources; false
, to disable JAXP
schema validation of model resources.isModelResourceValidationEnabled()
public final boolean isJavaValidationEnabled()
true
, if Java validation is enabled; false
, else.setJavaValidationEnabled(boolean)
public final void setJavaValidationEnabled(boolean value)
value
- true
, to enable Java validation; false
, to disable Java validation.isJavaValidationEnabled()
public Model getModel(ModelContext context) throws org.apache.tools.ant.BuildException, ModelException
Model
from a given ModelContext
.getModel
in class JomcTask
context
- The context to get a Model
from.Model
from context
.NullPointerException
- if contexŧ
is null
.org.apache.tools.ant.BuildException
- if no model is found.ModelException
- if getting the model fails.JomcTask.getModel()
,
isModelObjectClasspathResolutionEnabled()
,
JomcTask.isModelProcessingEnabled()
public void preExecuteTask() throws org.apache.tools.ant.BuildException
execute
method prior to the executeTask
method.preExecuteTask
in class JomcTask
org.apache.tools.ant.BuildException
- if execution fails.JomcTask.execute()
public ModelContext newModelContext(ClassLoader classLoader) throws ModelException
ModelContext
instance using a given class loader.newModelContext
in class JomcTask
classLoader
- The class loader to create a new ModelContext
instance with.ModelContext
instance backed by classLoader
.ModelException
- if creating a new ModelContext
instance fails.public JomcModelTask clone()
Copyright © 2005–2014 The JOMC Project. All rights reserved.