Package com.microstrategy.web.app.beans
Class AggregatedAppEventHandler
- java.lang.Object
-
- com.microstrategy.web.beans.GenericEventHandler
-
- com.microstrategy.web.beans.AggregatedEventHandler
-
- com.microstrategy.web.app.beans.AggregatedAppEventHandler
-
- All Implemented Interfaces:
WebEventHandler
,WebEventTags
,java.lang.Cloneable
public abstract class AggregatedAppEventHandler extends AggregatedEventHandler
Deprecated.Extend theAggregatedEventHandler
class instead. Because we no longer differentiate between metadata and application event handlers, we will support only a single aggregated event handler superclass.This class is used to customize event-handlers.
When a user wants to extend the functionality of an existing event-handler, s/he needs to extends this class. By doing this, all requests to process an event except the ones that this new handler is interested in, would be delegated to the super class.
For example, the following code segment represents a custom handler that can be associated with a PageBy bean:public class CustomPageByHandler extends AggregatedAppEventHandler { public CustomPageByHandler(){ super(EnumSysBeanTypes.AppBeanPageBy); } public boolean processRequest(RequestKeys keys) throws WebException { //------------------------// // process the event here // //------------------------// //or delegate it to the super class return handleDefaultRequest(keys); } }
The custom handler that is created needs to be associated with the appropriated bean in order for the processRequest on this handler to get invoked. This association is done in thepageConfig.xml
.
Typically, the line in thepageConfig.xml
which instantiates WebBean looks like<web-bean name="pbb" persist-mode="2" sys-bean="PageByBean"/>
If we need to associate this web bean with a new event handler, the syntax for that would be<web-bean name="pbb" persist-mode="2" sys-bean="PageByBean" event-handler="com.xyz.CustomPageByHandler"/>
Where
Note that this should be done for every page, in the file, where the bean is going to be instantiated.com.xyz.CustomPageByHandler
is the fully qualified class name of the new event handler class.- Since:
- MicroStrategy Web 8.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.web.beans.GenericEventHandler
GenericEventHandler.GenericEventKeys
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.beans.AggregatedEventHandler
defaultHandler
-
Fields inherited from class com.microstrategy.web.beans.GenericEventHandler
_extraEvents, layerOfHandleRequest, MULTIPLE_EVENT_SOURCE_SUFFIX, NO_EVENT_ID
-
Fields inherited from interface com.microstrategy.web.beans.WebEventTags
ATT_ARGUMENT_ENUMERATOR, ATT_ARGUMENT_ID, ATT_ARGUMENT_INDEX, ATT_ARGUMENT_NAME, ATT_ARGUMENT_REQUIRED, ATT_ARGUMENT_TYPE, ATT_ARGUMENT_VALIDATOR, ATT_ARGUMENT_VALUE, ATT_EVENT_DEPRECATED, ATT_EVENT_ENUMERATOR, ATT_EVENT_HANDLER_ENUMERATOR, ATT_EVENT_HANDLER_NAME, ATT_EVENT_HANDLER_TYPE, ATT_EVENT_ID, ATT_EVENT_NAME, ATT_EVENT_TARGET, TAG_ARGUMENT, TAG_ARGUMENTS, TAG_EVENT, TAG_EVENT_HANDLER, TAG_EVENT_HANDLERS, TAG_EVENTS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AggregatedAppEventHandler(int type)
Deprecated.Constructs anAggregatedAppEventHandler
with the specified event handler type (EnumEventHandlerTypes
).
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
setHandlerType(int type)
Deprecated.Sets the event handlertype
.-
Methods inherited from class com.microstrategy.web.beans.AggregatedEventHandler
defaultDelegate, delegateRequest, getDefaultHandler, getHandlerType, getSupportedWebComponentType, getWebEvent, handleDefaultRequest, processRequest, setDefaultHandler
-
Methods inherited from class com.microstrategy.web.beans.GenericEventHandler
addEvent, addEvent, addEvents, addEventsFromRequestKeys, addEventsFromXML, appendRemainingEvent, clone, getEventID, getEventTarget, getName, getNextSourceName, getNextSourceName, getOrderedEvents, getPendingEvents, getWebComponent, getWebEvent, getWebEvent, getWebEvents, getWebEventsFromRequest, handleRequest, isInitialized, isMyEvent, markInitailized, processExtraEvents, processMultipleEvents, processMultipleEvents, setName, setWebComponent, validateRequiredArgument
-
-
-
-
Constructor Detail
-
AggregatedAppEventHandler
protected AggregatedAppEventHandler(int type)
Deprecated.Constructs anAggregatedAppEventHandler
with the specified event handler type (EnumEventHandlerTypes
). A default event handler with the specified event handler is created if possible.- Parameters:
type
- the event handler type.
-
-
Method Detail
-
setHandlerType
protected void setHandlerType(int type)
Deprecated.Description copied from class:AggregatedEventHandler
Sets the event handlertype
. This implementation creates a new instance of the event handler with the specified type and sets it to be the default handler. Can be overridden in subclasses to change the way default handlers are created.NOTE: This implementation is provided for backward compatibility only. New code should set the default handler using
setDefaultHandler
.- Overrides:
setHandlerType
in classAggregatedEventHandler
- Parameters:
type
- the event handler type.
-
-