| Package: MachII.framework |
| Handles processing of EventCommands for an Event. |
| Method Summary | |
|---|---|
| public void | init() |
| public void | addCommand(EventCommand command) |
| public string | getAccess() |
| public void | handleEvent(Event event, EventContext eventContext) |
| public void | setAccess(string access) |
| Method Detail |
|---|
| addCommand |
|---|
public void addCommand( EventCommand command )
Parameters:
| EventCommand command |
Code:
<cffunction name="addCommand" access="public" returntype="void" output="false"> <cfargument name="command" type="MachII.framework.EventCommand" required="true" /> <cfset ArrayAppend(variables.commands, arguments.command) /> </cffunction>
| getAccess |
|---|
public string getAccess( )
Parameters:
Code:
<cffunction name="getAccess" access="public" returntype="string" output="false"> <cfreturn variables.access /> </cffunction>
| handleEvent |
|---|
public void handleEvent( Event event, EventContext eventContext )
Parameters:
| Event event |
| EventContext eventContext |
Code:
<cffunction name="handleEvent" access="public" returntype="void" output="true"> <cfargument name="event" type="MachII.framework.Event" required="true" /> <cfargument name="eventContext" type="MachII.framework.EventContext" required="true" /> <cfset var continue = true /> <cfset var command = 0 /> <cfset var i = 0 /> <cfloop index="i" from="1" to="#ArrayLen(variables.commands)#"> <cfset command = variables.commands[i] /> <cfset continue = command.execute(arguments.event, arguments.eventContext) /> <cfif continue IS false> <cfbreak /> </cfif> </cfloop> </cffunction>
| init |
|---|
public void init( )
Parameters:
Code:
<cffunction name="init" access="public" returntype="void" output="false"> </cffunction>
| setAccess |
|---|
public void setAccess( string access )
Parameters:
| string access |
Code:
<cffunction name="setAccess" access="public" returntype="void" output="false"> <cfargument name="access" type="string" required="true" /> <cfset variables.access = arguments.access /> </cffunction>