com.ail.core
Class CommandScript

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.core.CommandScript
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class CommandScript
extends Type

This class represents a scripted command object. Scripted commands typically represent 'soft logic' (logic which may be altered in a live environment). This type simply holds the script's details as a value object - it doesn't offer any execution type functionality.

Version:
$Revision: 1.3 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
CommandScript()
          Default constructor;
CommandScript(java.lang.String script)
          Constructor
CommandScript(java.lang.String script, java.lang.String type, java.lang.String namespace, java.lang.String commandName)
          Constructor
 
Method Summary
 java.lang.String getCommandName()
          Get script's command name.
 java.lang.String getKey()
           
 java.lang.String getNamespace()
          Get the script's namespace.
 java.lang.String getScript()
          Get the text of the script itself.
 java.lang.String getType()
          Get the type of the script.
 void setCommandName(java.lang.String commandName)
          Set the command name.
 void setKey(java.lang.String key)
           
 void setNamespace(java.lang.String namespace)
          Set the script's namespace.
 void setScript(java.lang.String script)
          Set the text of the script.
 void setType(java.lang.String type)
          Set the type of the script.
 
Methods inherited from class com.ail.core.Type
addAttribute, clone, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandScript

public CommandScript()
Default constructor;


CommandScript

public CommandScript(java.lang.String script,
                     java.lang.String type,
                     java.lang.String namespace,
                     java.lang.String commandName)
Constructor

Parameters:
script - Text of script.
type - Script's type (e.g. "BeanShell", "Drools", ...)
namespace - Configuration namespace where the command belongs
commandName - Command name associated with the script

CommandScript

public CommandScript(java.lang.String script)
Constructor

Parameters:
script - Script text
Method Detail

getKey

public java.lang.String getKey()

setKey

public void setKey(java.lang.String key)

getScript

public java.lang.String getScript()
Get the text of the script itself.

Returns:
The script.

setScript

public void setScript(java.lang.String script)
Set the text of the script.

Parameters:
script -

getNamespace

public java.lang.String getNamespace()
Get the script's namespace. This is the configuration namespace that the script relates to (is part of).

Returns:
Namespace

setNamespace

public void setNamespace(java.lang.String namespace)
Set the script's namespace.

Parameters:
namespace -
See Also:
getNamespace()

getCommandName

public java.lang.String getCommandName()
Get script's command name. This is the name that would be used to execute the script as a command. i.e.:

...
SomeCommand command=(SomeCommand)core.newCommand("CommandName");
command.invoke()
...

Returns:
The name of the command.

setCommandName

public void setCommandName(java.lang.String commandName)
Set the command name.

Parameters:
commandName -
See Also:
getCommandName()

getType

public java.lang.String getType()
Get the type of the script. This identifies which accessor would be used to execute the script, which also indicates the type. Examples might be BeanShellAccessor, or DroolsAccessor.

Returns:
Type of script.

setType

public void setType(java.lang.String type)
Set the type of the script.

Parameters:
type - Script type.
See Also:
getType()