public abstract class

AggregatedAppEventHandler

extends AggregatedEventHandler
java.lang.Object
   ↳ com.microstrategy.web.beans.GenericEventHandler
     ↳ com.microstrategy.web.beans.AggregatedEventHandler
       ↳ com.microstrategy.web.app.beans.AggregatedAppEventHandler

This class is deprecated.
Extend the AggregatedEventHandler class instead. Because we no longer differentiate between metadata and application event handlers, we will support only a single aggregated event handler superclass.

Class Overview

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 the pageConfig.xml.
Typically, the line in the pageConfig.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 com.xyz.CustomPageByHandler is the fully qualified class name of the new event handler class.

Note that this should be done for every page, in the file, where the bean is going to be instantiated.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.beans.GenericEventHandler
From interface com.microstrategy.web.beans.WebEventTags
[Expand]
Inherited Fields
From class com.microstrategy.web.beans.AggregatedEventHandler
From class com.microstrategy.web.beans.GenericEventHandler
Protected Constructors
AggregatedAppEventHandler(int type)
Constructs an AggregatedAppEventHandler with the specified event handler type (EnumEventHandlerTypes).
Protected Methods
void setHandlerType(int type)
Sets the event handler type.
[Expand]
Inherited Methods
From class com.microstrategy.web.beans.AggregatedEventHandler
From class com.microstrategy.web.beans.GenericEventHandler
From class java.lang.Object
From interface com.microstrategy.web.beans.WebEventHandler

Protected Constructors

protected AggregatedAppEventHandler (int type)

Constructs an AggregatedAppEventHandler 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.

Protected Methods

protected void setHandlerType (int type)

Sets the event handler type. 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.

Parameters
type the event handler type.