public abstract class

AbstractEventHandlerFactory

extends Object
implements WebEventTags
java.lang.Object
   ↳ com.microstrategy.web.beans.AbstractEventHandlerFactory
Known Direct Subclasses

This class is deprecated.
Event-handlers factories are not used. The bean itself now is responsible to define and create instances of its default event-handler.

Class Overview

This abstract class provides common functionalities for the WebEventHandlerFactory interface.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.web.beans.WebEventTags
Protected Constructors
AbstractEventHandlerFactory()
Default constructor
Public Methods
void addEventsToHandlers(Document handlerDoc)
The parsing logic in this abstract factory would be as follows: It gets a reference to the specific handler that is referred to in the definition.
void addEventsToHandlers(File file)
The parsing logic in this abstract factory would be as follows: It gets a reference to the specific handler that is referred to in the definition.
Protected Methods
WebEventHandler getEventHandler(int handlerType)
Returns a WebEventHandler instance of the specified type from the factory.
abstract WebEventHandler initEventHandler(int handlerType, Element eventsNode)
Instantiates and returns a WebEventHandler object based on the specified type and org.w3c.dom.Element object.
void initEventHandlers(Document handlerDoc)
Initializes the event handler factory from the specified org.w3c.dom.Document object.
void setEventHandler(int handlerType, WebEventHandler weh)
adds or replaces an instance of WebEventHandler into the factory.
[Expand]
Inherited Methods
From class java.lang.Object

Protected Constructors

protected AbstractEventHandlerFactory ()

Default constructor

Public Methods

public void addEventsToHandlers (Document handlerDoc)

The parsing logic in this abstract factory would be as follows: It gets a reference to the specific handler that is referred to in the definition. If there is no pre-defined handler of that type, ignore that type Otherwise call addEvents(Element) on the handler The handler now needs to check if this an event that is already defined. If so, get a reference to that event. If not, just add it. It has to check if any of the arguments are already defined. If they are, get reference to the existing argument and overwrite values. If not, add the new argument and set values.

Parameters
handlerDoc a DOM Document object of the event definitions

public void addEventsToHandlers (File file)

The parsing logic in this abstract factory would be as follows: It gets a reference to the specific handler that is referred to in the definition. If there is no pre-defined handler of that type, ignore that type Otherwise call addEvents(Element) on the handler. The handler now needs to check if this an event that is already defined. If so, get a reference to that event. If not, just add it. It has to check if any of the arguments are already defined. If they are, get reference to the existing argument and overwrite values. If not, add the new argument and set values.

Parameters
file a file reference to the definition of the events
Throws
WebBeanException thrown if there is any error

Protected Methods

protected WebEventHandler getEventHandler (int handlerType)

Returns a WebEventHandler instance of the specified type from the factory.

Parameters
handlerType the event handler type.
Returns

protected abstract WebEventHandler initEventHandler (int handlerType, Element eventsNode)

Instantiates and returns a WebEventHandler object based on the specified type and org.w3c.dom.Element object.

Parameters
handlerType the event handler type
eventsNode a org.w3c.dom.Element object containing the definition of the event handler of the specified type.
Returns

protected void initEventHandlers (Document handlerDoc)

Initializes the event handler factory from the specified org.w3c.dom.Document object. All event handlers defined in the Document object are cached in the factory.

Any existing event handler with the same type is replaced by the newly added event handler.

Parameters
handlerDoc a org.w3c.dom.Document object containing all the event handlers supported by your application. The root node of Document object should be TAG_EVENT_HANDLERS.

protected void setEventHandler (int handlerType, WebEventHandler weh)

adds or replaces an instance of WebEventHandler into the factory.

Parameters
handlerType the type of the event handler to add
weh an instance of WebEventHandler.