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 Details

  • Constructor Details

    • AbstractAtlTask

      public AbstractAtlTask()
  • Method Details

    • init

      public void init() throws org.apache.tools.ant.BuildException
      Overrides:
      init in class org.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:
      execute in class org.apache.tools.ant.Task
      Throws:
      org.apache.tools.ant.BuildException
      See Also:
      • Task.execute()
    • error

      protected void error(String msg, Throwable e)
      Stops the build, deletes log.
      Parameters:
      msg - the error message
      e - the thrown exception
    • error

      protected void error(String msg)
      Stops the build, deletes log.
      Parameters:
      msg - the error message
    • getLauncherName

      protected String getLauncherName()
      Returns the launcher name.
      Returns:
      the launcher name
    • getLauncher

      protected ILauncher getLauncher()
      Returns the launcher.
      Returns:
      the launcher
    • getDefaultModelFactory

      protected ModelFactory 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.BuildException
      Creates a new IModel using the specified factory.
      Parameters:
      factoryName - the ModelFactory name
      modelName - the model name
      referenceModelName - the reference model name
      options - 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.BuildException
      Creates a new IModel using the specified factory.
      Parameters:
      factory - the ModelFactory
      modelName - the model name
      referenceModelName - the reference model name
      options - 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.BuildException
      Creates a new IReferenceModel using the specified factory.
      Parameters:
      factory - the ModelFactory
      modelName - the model name
      options - the creation options
      Returns:
      the new IReferenceModel
      Throws:
      org.apache.tools.ant.BuildException