Class AbstractAtlTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.eclipse.m2m.atl.core.ant.tasks.AbstractAtlTask
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ATLModelTransformationTask
,LoadModelTask
,SaveModelTask
public class AbstractAtlTask
extends org.apache.tools.ant.Task
Common ATL task:
- handle atl log.
- provide utility methods.
- handle finalization (dispose of models).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Default launcher name.static final String
Default model handler name.static final String
The launcher property name.static final String
The model handler name.static final String
The model name.static final String
The model path.static final String
The newModel boolean.static final String
The result reference name.Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Stops the build, deletes log.protected void
Stops the build, deletes log.void
execute()
protected ModelFactory
Returns the default modelFactory for this launcher.protected ILauncher
Returns the launcher.protected String
Returns the launcher name.void
init()
protected IModel
newModel
(String factoryName, String modelName, String referenceModelName, Map<String, Object> options) Creates a newIModel
using the specified factory.protected IModel
newModel
(ModelFactory factory, String modelName, String referenceModelName, Map<String, Object> options) Creates a newIModel
using the specified factory.protected IReferenceModel
newReferenceModel
(ModelFactory factory, String modelName, Map<String, Object> options) Creates a newIReferenceModel
using the specified factory.Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
LAUNCHER_PROPERTY
The launcher property name.- See Also:
-
DEFAULT_LAUNCHER
Default launcher name.- See Also:
-
RESULT_REFERENCE
The result reference name.- See Also:
-
DEFAULT_MODEL_HANDLER
Default model handler name.- See Also:
-
OPTION_MODEL_HANDLER
The model handler name.- See Also:
-
OPTION_MODEL_NAME
The model name.- See Also:
-
OPTION_MODEL_PATH
The model path.- See Also:
-
OPTION_NEW_MODEL
The newModel boolean.- See Also:
-
-
Constructor Details
-
AbstractAtlTask
public AbstractAtlTask()
-
-
Method Details
-
init
public void init() throws org.apache.tools.ant.BuildException- Overrides:
init
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
- See Also:
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
execute
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
- See Also:
-
error
Stops the build, deletes log.- Parameters:
msg
- the error messagee
- the thrown exception
-
error
Stops the build, deletes log.- Parameters:
msg
- the error message
-
getLauncherName
Returns the launcher name.- Returns:
- the launcher name
-
getLauncher
Returns the launcher.- Returns:
- the launcher
-
getDefaultModelFactory
Returns the default modelFactory for this launcher.- Returns:
- the default modelFactory for this launcher
-
newModel
protected IModel newModel(String factoryName, String modelName, String referenceModelName, Map<String, Object> options) throws org.apache.tools.ant.BuildExceptionCreates a newIModel
using the specified factory.- Parameters:
factoryName
- theModelFactory
namemodelName
- the model namereferenceModelName
- the reference model nameoptions
- the creation options- Returns:
- the new
IModel
- Throws:
org.apache.tools.ant.BuildException
-
newModel
protected IModel newModel(ModelFactory factory, String modelName, String referenceModelName, Map<String, Object> options) throws org.apache.tools.ant.BuildExceptionCreates a newIModel
using the specified factory.- Parameters:
factory
- theModelFactory
modelName
- the model namereferenceModelName
- the reference model nameoptions
- the creation options- Returns:
- the new
IModel
- Throws:
org.apache.tools.ant.BuildException
-
newReferenceModel
protected IReferenceModel newReferenceModel(ModelFactory factory, String modelName, Map<String, Object> options) throws org.apache.tools.ant.BuildExceptionCreates a newIReferenceModel
using the specified factory.- Parameters:
factory
- theModelFactory
modelName
- the model nameoptions
- the creation options- Returns:
- the new
IReferenceModel
- Throws:
org.apache.tools.ant.BuildException
-