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 StringDefault launcher name.static final StringDefault model handler name.static final StringThe launcher property name.static final StringThe model handler name.static final StringThe model name.static final StringThe model path.static final StringThe newModel boolean.static final StringThe result reference name.Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidStops the build, deletes log.protected voidStops the build, deletes log.voidexecute()protected ModelFactoryReturns the default modelFactory for this launcher.protected ILauncherReturns the launcher.protected StringReturns the launcher name.voidinit()protected IModelnewModel(String factoryName, String modelName, String referenceModelName, Map<String, Object> options) Creates a newIModelusing the specified factory.protected IModelnewModel(ModelFactory factory, String modelName, String referenceModelName, Map<String, Object> options) Creates a newIModelusing the specified factory.protected IReferenceModelnewReferenceModel(ModelFactory factory, String modelName, Map<String, Object> options) Creates a newIReferenceModelusing 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, setTaskTypeMethods 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:
initin classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException- See Also:
-
Task.init()
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException- See Also:
-
Task.execute()
-
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 newIModelusing the specified factory.- Parameters:
factoryName- theModelFactorynamemodelName- 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 newIModelusing the specified factory.- Parameters:
factory- theModelFactorymodelName- 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 newIReferenceModelusing the specified factory.- Parameters:
factory- theModelFactorymodelName- the model nameoptions- the creation options- Returns:
- the new
IReferenceModel - Throws:
org.apache.tools.ant.BuildException
-