| Package: MachII.framework.commands |
| Inherits from: framework.Command |
| An Command for executing a subroutine. |
| Method Summary | |
|---|---|
| public ExecuteCommand |
init(string subroutineName)
Used by the framework for initialization. |
| public boolean |
execute(Event event, EventContext eventContext)
Executes the command. |
| private string | getSubroutineName() |
| private void | setSubroutineName(string subroutineName) |
| Methods inherited from framework.Command: setParameter , getParameter , setParameters |
|---|
| Method Detail |
|---|
| execute |
|---|
public boolean execute( Event event, EventContext eventContext )
Executes the command.
Parameters:
| Event event |
| EventContext eventContext |
Code:
<cffunction name="execute" access="public" returntype="boolean" output="true" hint="Executes the command."> <cfargument name="event" type="MachII.framework.Event" required="true" /> <cfargument name="eventContext" type="MachII.framework.EventContext" required="true" /> <cfreturn arguments.eventContext.executeSubroutine(getSubroutineName(), arguments.event) /> </cffunction>
| getSubroutineName |
|---|
private string getSubroutineName( )
Parameters:
Code:
<cffunction name="getSubroutineName" access="private" returntype="string" output="false"> <cfreturn variables.subroutineName /> </cffunction>
| init |
|---|
public ExecuteCommand init( string subroutineName )
Used by the framework for initialization.
Parameters:
| string subroutineName |
Code:
<cffunction name="init" access="public" returntype="ExecuteCommand" output="false" hint="Used by the framework for initialization."> <cfargument name="subroutineName" type="string" required="true" /> <cfset setSubroutineName(arguments.subroutineName) /> <cfreturn this /> </cffunction>
| setSubroutineName |
|---|
private void setSubroutineName( string subroutineName )
Parameters:
| string subroutineName |
Code:
<cffunction name="setSubroutineName" access="private" returntype="void" output="false"> <cfargument name="subroutineName" type="string" required="true" /> <cfset variables.subroutineName = arguments.subroutineName /> </cffunction>