MetaBoss

com.metaboss.sdlctools.applications.anttasks
Class MetaBossTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended bycom.metaboss.sdlctools.applications.anttasks.MetaBossTask
Direct Known Subclasses:
MetaBossModelToolTask, MetaBossUMLProfile, ScenarioRunnerTask

public abstract class MetaBossTask
extends org.apache.tools.ant.Task

Represents the base class for all tasks using MetaBoss. It handles static initialisation of the 'MetaBoss.Home' java system property from the environment. The 'MetaBoss.Home' java system property is used by many MetaBoss programs to find out the location of the libraries, configuration files etc. This task will attempt to ensure that the 'MetaBoss.Home' java system property is set as follows:

  1. If 'MetaBoss.Home' java system property is already set - it is left alone and no futher propcessing is done.
  2. If 'metaboss_home' ant project property is set - it is verified to contain valid and accessible directory and is set as 'MetaBoss.Home' java system property.
  3. If 'METABOSS_HOME' environment variable is set - it is verified to contain valid and accessible directory and is set as 'MetaBoss.Home' java system property.
  4. The directory is inferred from the location of the jar file containing this class. This jar is expected to be in /lib/ directory therefore the path to the grandparent directory of the jar is set as 'MetaBoss.Home' java system property.


Constructor Summary
MetaBossTask()
           
 
Method Summary
 org.apache.tools.ant.util.TaskLogger getLogger()
          The getter for the logger
 org.apache.tools.ant.types.Path getPath(java.lang.String pPathName)
           
 org.apache.tools.ant.types.FileSet getPathAsFileSet(java.lang.String pPathName)
           
 void init()
          The lifecycle method.
 
Methods inherited from class org.apache.tools.ant.Task
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaBossTask

public MetaBossTask()
Method Detail

init

public void init()
The lifecycle method. Derived classes must call super


getLogger

public org.apache.tools.ant.util.TaskLogger getLogger()
The getter for the logger


getPath

public org.apache.tools.ant.types.Path getPath(java.lang.String pPathName)
                                        throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

getPathAsFileSet

public org.apache.tools.ant.types.FileSet getPathAsFileSet(java.lang.String pPathName)
                                                    throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

MetaBoss

Copyright © 2000-2005 Softaris Pty.Ltd. All Rights Reserved.