com.microstrategy.web.beans.WebEventHandler |
This interface generates and handles a set of WebEvent
.
A WebEventHandler
retrieves any event-related information,
such as event id and argument values, from the RequestKeys
object.
A instance of WebEventHandler
is usually attached to a
WebComponent
, the brick for building a Web application. Web
applications are allowed to dynamically add a WebEvent
to a WebEventHandler
instance at the run time by providing
the XML representation of the WebEvent
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
addEvent(WebEvent event)
Adds
WebEvent into the current event handler. | ||||||||||
abstract void |
addEventsFromXML(String eventsXML)
Adds one or more
WebEvent into the current event handler. | ||||||||||
abstract void |
appendRemainingEvent(WebEvent event)
Append an remaining event at the end of the remaining events' list.
| ||||||||||
abstract boolean |
delegateRequest(RequestKeys keys)
This method encapsulates the mechanism by which a request is delegated
to child WebComponents.
| ||||||||||
abstract int |
getHandlerType()
Returns the
type of the current
WebEventHandle . | ||||||||||
abstract SimpleList |
getPendingEvents()
Returns the list of events that were not processed.
| ||||||||||
abstract Class |
getSupportedWebComponentType()
Returns the
Class type of the WebComponent this event
handler is associated with. | ||||||||||
abstract WebComponent |
getWebComponent()
Returns the
WebComponent object associated with the current
event handler. | ||||||||||
abstract WebEvent |
getWebEvent(int eventID)
Returns the specified
WebEvent instance which this event handler
supports. | ||||||||||
abstract Enumeration |
getWebEvents()
Returns an enumeration over the
WebEvent objects suppored by this event
handler. | ||||||||||
abstract Enumeration |
getWebEventsFromRequest(RequestKeys keys)
Returns an enumeration over the
WebEvent suppored by this event
handler that are present in the request keys provided. | ||||||||||
abstract boolean |
handleRequest(RequestKeys keys)
Handles the
WebEvent specified in the RequestKeys object. | ||||||||||
abstract boolean |
processRequest(RequestKeys keys)
This method encapsulates the logic to process incoming events
without regard as to how it was triggered or be concerned with
delegation the request (see
processRequest(RequestKeys) ). | ||||||||||
abstract void |
setWebComponent(WebComponent component)
Sets a
WebComponent instance on this WebEventHandler. |
Adds WebEvent
into the current event handler.
If there is an event already defined with the id of the event
that is passed in, then it is overwritten
event | the event to be added |
---|
Adds one or more WebEvent
into the current event handler.
eventsXML | the XML representation of web events. |
---|
Append an remaining event at the end of the remaining events' list.
Such remaining event will be processed at the end.
event | the WebEvent object.
|
---|
This method encapsulates the mechanism by which a request is delegated
to child WebComponents. By default, the request will be delegated
to the child WebComponent along the event source path
irrespective of what was returned by processRequest(RequestKeys)
.
Normally, this is invoked by handleRequest(RequestKeys)
.
The request keys must also define an event ID otherwise the event
will not be propagated.
keys | the RequestKeys object containing event ID, sources, and any other information. |
---|
processRequest
or one of its children.WebException | thrown if handling of the request fails. |
---|
Returns the type
of the current
WebEventHandle
.
Returns the list of events that were not processed.
While handling the request, if after processing an event the page is not
in Succesfull state, the EventHandler stops processing the rest of the events.
This list resturns those events that remain pending.
handleRequest()
.
If handelRequest()
was not invoked, it returns null.
Returns the Class
type of the WebComponent
this event
handler is associated with.
Class
of the WebComponent
this event
handler is associated with.
Returns the WebComponent
object associated with the current
event handler.
Returns the specified WebEvent
instance which this event handler
supports.
eventID | the event id of the WebEvent. |
---|
Returns an enumeration over the WebEvent
objects suppored by this event
handler. The WebEvent
objects are returned in no particular order.
WebEvent
objects supported.
Returns an enumeration over the WebEvent
suppored by this event
handler that are present in the request keys provided. The WebEvent
are returned in no particular order.
keys | the RequestKeys object. |
---|
WebEvent
supported.
Handles the WebEvent
specified in the RequestKeys
object.
By default, this method invokes processRequest(RequestKeys)
followed by delegateRequest(RequestKeys)
. In most cases,
only processRequest
is implemented (or overridden) to
provide the event processing logic.
keys | the RequestKeys object containing event ID, sources, and any other information. |
---|
processRequest
or one of its children.WebException | thrown if handling of the request fails. |
---|
This method encapsulates the logic to process incoming events
without regard as to how it was triggered or be concerned with
delegation the request (see processRequest(RequestKeys)
).
Normally, this is invoked by handleRequest(RequestKeys)
.
keys | the RequestKeys object containing event ID, sources, and any other information. |
---|
WebException | thrown if handling of the request fails. |
---|
Sets a WebComponent
instance on this WebEventHandler.
A WebComponent must maintain a one-one relationship with
an event handler instance. After this method call, the
WebComponent previously associated with this event handler
should have a null instance of WebEventHandler
, and the
event handler instance previously associate the specified
WebComponent
should have a null WebComponent
.
component | a new WebComponent object. |
---|