edu.bonn.xulu.plugin.appl
Class DataScriptInterpreter_Basic.Command_Plugin

java.lang.Object
  extended by edu.bonn.xulu.plugin.appl.DataScriptInterpreter_Basic.Command_Plugin
All Implemented Interfaces:
AbstractCommandInterpreter.Command
Enclosing class:
DataScriptInterpreter_Basic

protected class DataScriptInterpreter_Basic.Command_Plugin
extends Object
implements AbstractCommandInterpreter.Command

Forwards scripting to a method in a plugin

Author:
Dominik Appl - University of Bonn/Germany

Constructor Summary
DataScriptInterpreter_Basic.Command_Plugin(String pluginname, Vector pluginCommands)
          Creates a new plugin command.
 
Method Summary
 void check()
          Checks if the parameters are set correctly
 void execute(XuluModellingPlatform appl)
          Executes the commands
 String getDescription()
          returns a description of the command
 XuluPlugin getPluginForName(String name)
          Returns a XuluPlugin for a fully qualified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataScriptInterpreter_Basic.Command_Plugin

public DataScriptInterpreter_Basic.Command_Plugin(String pluginname,
                                                  Vector pluginCommands)
Creates a new plugin command. The command will be forwarded to the specified plugin, which is responsible for interpreting it correctly.

Parameters:
pluginname - the exact java-name to the class of the plugin
pluginCommands - Vector of tokenized commands which are forwared to the plugin. Each command is a String array with position 0 containing the tagname and further positions containing the values for this tag.
See Also:
ModelResourceMappingScriptInterpreter_Basic
Method Detail

getDescription

public String getDescription()
returns a description of the command

Specified by:
getDescription in interface AbstractCommandInterpreter.Command

execute

public void execute(XuluModellingPlatform appl)
             throws Exception
Executes the commands

Specified by:
execute in interface AbstractCommandInterpreter.Command
Parameters:
appl - Application which executes the command
Throws:
Exception - wenn ein Fehler bei der Ausfuehrung aufritt

getPluginForName

public XuluPlugin getPluginForName(String name)
Returns a XuluPlugin for a fully qualified name.

Returns:
the plugin, if one was found. Null if no plugin with the given name is loaded

check

public void check()
Checks if the parameters are set correctly

Specified by:
check in interface AbstractCommandInterpreter.Command