SimplePlugin

Package: MachII.plugins
Inherits from: framework.BaseComponent  <  framework.Plugin
A simple Plugin example.

<!--- License: Copyright 2006 Mach-II Corporation 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: Mach-II Corporation $Id: SimplePlugin.cfc 4813 2006-11-15 05:03:12Z pfarrell $ Created version: 1.0.0 Updated version: 1.1.1 Notes: The PluginManager only calls plugin points that are utilized. Remove any un-implemented plugin point methods (i.e. preProcess(), etc.) to improve application performance as fewer plugin points will be called on each request. For example if your plugin only implements the preEvent plugin point, then remove the remaining points. (pfarrell) --->

Method Summary
public void configure()

Configures the plugin.

public void handleException(EventContext eventContext, Exception exception)
public void postEvent(EventContext eventContext)
public void postProcess(EventContext eventContext)
public void postView(EventContext eventContext)
public void preEvent(EventContext eventContext)
public void preProcess(EventContext eventContext)
public void preView(EventContext eventContext)
Methods inherited from framework.Plugin:   init , abortEvent
Methods inherited from framework.BaseComponent:   isParameterDefined , setPropertyManager , setParameters , getPropertyManager , announceEvent , getAppManager , setAppManager , hasParameter , getParameter , getProperty , getParameters , setProperty , setParameter
Method Detail
configure

public void configure( )

Configures the plugin.

Parameters:

Code:

	<cffunction name="configure" access="public" returntype="void" output="false"
		hint="Configures the plugin.">
	</cffunction> 

handleException

public void handleException( EventContext eventContext, Exception exception )

Parameters:
EventContext eventContext
Exception exception

Code:

	<cffunction name="handleException" access="public" returntype="void" output="true">
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		<cfargument name="exception" type="MachII.util.Exception" required="true" />
		<cfoutput>&nbsp;SimplePlugin.handleException()<br /></cfoutput>
	</cffunction> 

postEvent

public void postEvent( EventContext eventContext )

Parameters:
EventContext eventContext

Code:

	<cffunction name="postEvent" access="public" returntype="void" output="true">
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		<cfoutput>&nbsp;SimplePlugin.postEvent()<br /></cfoutput>
	</cffunction> 

postProcess

public void postProcess( EventContext eventContext )

Parameters:
EventContext eventContext

Code:

	<cffunction name="postProcess" access="public" returntype="void" output="true">
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		<cfoutput>&nbsp;SimplePlugin.postProcess()<br /></cfoutput>
	</cffunction> 

postView

public void postView( EventContext eventContext )

Parameters:
EventContext eventContext

Code:

	<cffunction name="postView" access="public" returntype="void" output="true">
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		<cfoutput>&nbsp;SimplePlugin.postView()<br /></cfoutput>
	</cffunction> 

preEvent

public void preEvent( EventContext eventContext )

Parameters:
EventContext eventContext

Code:

	<cffunction name="preEvent" access="public" returntype="void" output="true">
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		<cfoutput>&nbsp;SimplePlugin.preEvent()<br /></cfoutput>
	</cffunction> 

preProcess

public void preProcess( EventContext eventContext )

Parameters:
EventContext eventContext

Code:

	<cffunction name="preProcess" access="public" returntype="void" output="true">
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		<cfoutput>&nbsp;SimplePlugin.preProcess()<br /></cfoutput>
	</cffunction> 

preView

public void preView( EventContext eventContext )

Parameters:
EventContext eventContext

Code:

	<cffunction name="preView" access="public" returntype="void" output="true">
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		<cfoutput>&nbsp;SimplePlugin.preView()<br /></cfoutput>
	</cffunction>