Documentation home page

MachII.framework
Component EventFilter

framework.BaseComponent
  |
  +--framework.EventFilter

Base EventFilter component.

Method Summary
public EventFilter init(AppManager appManager, [struct parameters="#StructNew()#"])
          Used by the framework for initialization. Do not override.
public boolean filterEvent(Event event, EventContext eventContext, [struct paramArgs="#StructNew()#"])
          Override (be sure to keep the same arguments and returntype) to provide event filtering logic.

Methods inherited from framework.BaseComponent
setParameters, hasParameter, buildUrlToModule, isParameterDefined, buildUrl, announceEventInModule, setAppManager, getParameter, getProperty, getParameters, setProperty, getPropertyManager, bindValue, configure, getAppManager, setParameter, announceEvent
 

Method Detail

filterEvent

public boolean filterEvent(Event event, EventContext eventContext, [struct paramArgs="#StructNew()#"])
Override (be sure to keep the same arguments and returntype) to provide event filtering logic.

Parameters:
Event event
EventContext eventContext
[struct paramArgs="#StructNew()#"]

Code:
	<cffunction name="filterEvent" access="public" returntype="boolean" output="false"
		hint="Override (be sure to keep the same arguments and returntype) to provide event filtering logic.">
		<cfargument name="event" type="MachII.framework.Event" required="true" />
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		<cfargument name="paramArgs" type="struct" required="false" default="#StructNew()#" />
		
		<cfreturn true />
	</cffunction>

init

public EventFilter init(AppManager appManager, [struct parameters="#StructNew()#"])
Used by the framework for initialization. Do not override.

Parameters:
AppManager appManager
[struct parameters="#StructNew()#"]

Code:
	<cffunction name="init" access="public" returntype="EventFilter" output="false"
		hint="Used by the framework for initialization. Do not override.">
		<cfargument name="appManager" type="MachII.framework.AppManager" required="true" />
		<cfargument name="parameters" type="struct" required="false" default="#StructNew()#" />
		
		<cfset super.init(arguments.appManager, arguments.parameters) />
		
		<cfreturn this />
	</cffunction>

Full Component Code:
<!---
License:
Copyright 2007 GreatBizTools, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Copyright: GreatBizTools, LLC
Author: Ben Edwards (ben@ben-edwards.com)
$Id: EventFilter.cfc 482 2007-09-05 02:07:07Z pfarrell $

Created version: 1.0.0
Updated version: 1.5.0
--->
<cfcomponent 
	displayname="EventFilter"
	extends="MachII.framework.BaseComponent"
	output="false"
	hint="Base EventFilter component.">
	
	<!---
	INITIALIZATION / CONFIGURATION
	--->
	<cffunction name="init" access="public" returntype="EventFilter" output="false"
		hint="Used by the framework for initialization. Do not override.">
		<cfargument name="appManager" type="MachII.framework.AppManager" required="true" />
		<cfargument name="parameters" type="struct" required="false" default="#StructNew()#" />
		
		<cfset super.init(arguments.appManager, arguments.parameters) />
		
		<cfreturn this />
	</cffunction>
	
	<!---
	PUBLIC FUNCTIONS
	--->
	<cffunction name="filterEvent" access="public" returntype="boolean" output="false"
		hint="Override (be sure to keep the same arguments and returntype) to provide event filtering logic.">
		<cfargument name="event" type="MachII.framework.Event" required="true" />
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		<cfargument name="paramArgs" type="struct" required="false" default="#StructNew()#" />
		
		<cfreturn true />
	</cffunction>
	
</cfcomponent>