| |
|
| com.metaboss.sdlctools.applications.anttasks.MetaBossTask com.metaboss.sdlctools.applications.anttasks.MetaBossModelToolTask
All known Subclasses: com.metaboss.sdlctools.applications.anttasks.convertors.MetaBossToUML, com.metaboss.sdlctools.applications.anttasks.convertors.MetaBossToMetaBoss, com.metaboss.sdlctools.applications.anttasks.builder.MetaBossBuilderTask, com.metaboss.sdlctools.applications.anttasks.convertors.UMLToMetaBoss,
MetaBossModelToolTask | abstract public class MetaBossModelToolTask extends MetaBossTask (Code) | | The abstract MetaBoss Model Tool task. Automatically manages a single model loaded from the directory
In addition to attributes supported by base class task, this task supports
following attributes:
Attribute Name |
Attribute Description |
Required |
modeldir |
The mandatory path to the directory where model is stored.(It has to
point to the directory where top level Model.xml file is)
|
Yes if task requires to load the model (most of the MetaBoss tasks are) |
ref |
The optional reference of the root element of the model. This is the
specification of the element this task will be working on.
|
Yes if task requires element to be specified |
This task also supports following subelements:
SubElement Name |
SubElement Description |
Occurrs |
param |
Zero or more of these elements can be specified. Each one contains
name-value pair to be passed as a parameter to the tool invoked in this task.
|
Zero or more times |
env |
Zero or more of these elements can be specified. Each one contains
name-value pair to be set into system environment before tool is invoked in this task.
|
Zero or more times |
|
Constructor Summary | |
public | MetaBossModelToolTask(boolean pUsesExistingModel) The only constructor available for the subclasses.
Parameters: pUsesExistingModel - if it is set to true - the model stored in the directorypointed by the 'modeldir' attribute will be automatically opened - this is typical for thetask using the existing models. |
MetaBossModelToolTask | public MetaBossModelToolTask(boolean pUsesExistingModel)(Code) | | The only constructor available for the subclasses.
Parameters: pUsesExistingModel - if it is set to true - the model stored in the directorypointed by the 'modeldir' attribute will be automatically opened - this is typical for thetask using the existing models. If this is set to false than this task will ensure that the modeldoes not exist at the specified directory and it is not loaded - this is typical for taskscreating the new models. |
addConfiguredEnv | public void addConfiguredEnv(NameValuePairType pEnvironment) throws BuildException(Code) | | Adds environment setting to be set in the system environment while tool is running
|
addConfiguredParam | public void addConfiguredParam(NameValuePairType pParameter) throws BuildException(Code) | | Adds input parameter to be passed to the tool when it is invoked
|
execute | public void execute() throws BuildException(Code) | | |
findModelElement | public ModelElement findModelElement(String pModelElementRef, Class[] pExpectedClasses) throws BuildException(Code) | | Finds model element with given reference or return null if none exists.
Automatically verifies if returned element is one of the desired type.
Parameters: pModelElementRef - - model element ref Parameters: pExpectedClasses - - array of expected java classes. This parameter is ignored ifit is null or zero-length. Otherwise it is used to check the type of found class. found model element or null if element with specified ref was not found.If expected classes paramenter was given - the returned element is vetted against list of allowed classes. throws: BuildException - in case of troubles including the case when found model element is not of the expected type |
findModelElementsByXPath | public ModelElement[] findModelElementsByXPath(ModelElement pContextElement, String pModelElementXPath, Class[] pExpectedClasses) throws BuildException(Code) | | Finds all model elements matching given xpath.
Automatically verifies if returned element is one of the desired type.
Parameters: pModelElementXPath - - the xpath to use Parameters: pExpectedClasses - - array of expected java classes. This parameter is ignored ifit is null or zero-length. Otherwise it is used to check the type of found class. found model elements. If expected classes paramenter was given -the returned element is vetted against list of allowed classes. May return zer-length array throws: BuildException - in case of trouble |
getInvocationEnvironment | protected Properties getInvocationEnvironment()(Code) | | Returns the set of zero or more environment settings to be set in the system environment while tool is running
|
getInvocationParameters | protected Properties getInvocationParameters()(Code) | | Returns the set of zero or more parameters to be passed to the tool when it is invoked
|
getModelDir | public File getModelDir() throws BuildException(Code) | | The getter for the "modeldir" attribute
|
getModelElement | public ModelElement getModelElement(String pModelElementRef, Class[] pExpectedClasses) throws BuildException(Code) | | Finds model element with given reference or throws exception if none exists.
Automatically verifies if returned element is one of the desired type.
Parameters: pModelElementRef - - model element ref Parameters: pExpectedClasses - - array of expected java classes. This parameter is ignored ifit is null or zero-length. Otherwise it is used to check the type of found class. found model element. If expected classes paramenter was given -the returned element is vetted against list of allowed classes. Never returns null throws: BuildException - in case of troubles including the case when model element was not found or found model element is not of the expected type |
getModelName | public String getModelName() throws BuildException(Code) | | The getter for the name of the model. Only works after "modeldir" attribute is set
|
getModelRootPackage | public MetaBossModelPackage getModelRootPackage() throws BuildException(Code) | | The getter for the root package of the model. Only works after "modeldir" attribute is set
|
getRootModelElement | public ModelElement getRootModelElement() throws BuildException(Code) | | The getter for the optional root element for the whole task
|
setModeldir | public void setModeldir(File pModelDir) throws BuildException(Code) | | The setter for the "modeldir" attribute
|
setRef | public void setRef(String pRef) throws BuildException(Code) | | The setter for the "ref" attribute. At the moment only systemref is allowed
|
|
|
|