ext.sulis.service
Class StandardEventService

java.lang.Object
  extended by wt.services.StandardManager
      extended by ext.sulis.service.StandardEventService
All Implemented Interfaces:
EventService, java.io.Serializable, wt.fc.NetFactor, wt.services.Manager

public class StandardEventService
extends wt.services.StandardManager
implements EventService

Provide a service to allow I*E tasks as event handlers with the option to veto aginst the event.

to register the service add the following line to site.xconf:

<Property name="wt.services.service.4000" overridable="true" targetFile="codebase/wt.properties" value="ext.sulis.service.EventService/ext.sulis.service.StandardEventService"/>
to configure an event to a task use a property of the form ext.sulis.event.CLASS-METHOD-EVENT-TYPE=task in wt.properties.

Example: to register a listener for the PersistenceManagerEvent PRE_DELETE that calls the task ext/sulis/fixOldVersionState.xml if the target is of type WTPart we add the following line to wt.properties:

<Property name="ext.sulis.event.wt.fc.PersistenceManagerEvent-generateEventKey-PRE_DELETE-WTPart" overridable="true" targetFile="codebase/wt.properties" value="ext/sulis/fixOldVersionState.xml"/>
if a target does not implement Typed then we use WCTYPE|name.of.the.Class
the type gets always stripped off its package name, and the service determines the applicable task by looking at the most specific types first. this means that for a subtype of WTPart like WCTYPE|wt.part.WTPart|de.sulis.SubTypeA|de.sulis.SubTypeB the service will check first SubTypeB, then SubTypeA, then WTPart
for vetoable events to succeed the task MUST pass back a group with getSuccess() returning "OK"

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardEventService()
           
 
Method Summary
static StandardEventService newStandardEventService()
           
protected  void performStartupProcess()
           
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getConceptualClassname, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StandardEventService

public StandardEventService()
Method Detail

performStartupProcess

protected void performStartupProcess()
                              throws wt.services.ManagerException
Overrides:
performStartupProcess in class wt.services.StandardManager
Throws:
wt.services.ManagerException

newStandardEventService

public static StandardEventService newStandardEventService()
                                                    throws wt.util.WTException
Throws:
wt.util.WTException