Package com.microstrategy.web.beans
Interface WebEventHandler
- 
- All Known Implementing Classes:
- AbstractObjectExplorerEventHandler,- AccordionTabManagerEventHandler,- AddDataSetObjectExplorerEventHandler,- AdminBeanEventHandler,- AdminServletEventHandler,- AggregatedAppEventHandler,- AggregatedEventHandler,- AggregatedFolderEventHandler,- AggregatedReportSavePropertiesEventHandler,- AttributeEventHandler,- DatasetObjectExplorerEventHandler,- DerivedElementEventHandler,- DerivedElementsBrowserEventHandler,- DiagnosticsBeanEventHandler,- ExpressionPromptEventHandlerImpl,- FilterEventHandler,- FolderFrameEventHandler,- FolderObjectExplorerEventHandler,- GenericEventHandler,- ImportDerivedElementsEventHandler,- PageSetupHTMLEditorEventHandler,- ProjectBrowserEventHandler,- ReportPageEventHandler,- RibbonEventHandlerImpl,- RWBeanHTML5VIEventHandler,- RWGraphDropZonesEditorEventHandlerImpl,- SecurityFilterEventHandler,- SecurityRoleEventHandler,- SysEventHandler,- ViewFilterElementPanelEventHandler,- ViewReportObjectExplorerEventHandler,- XDADataExplorerEventHandler
 
 public interface WebEventHandlerThis interface generates and handles a set ofWebEvent. AWebEventHandlerretrieves any event-related information, such as event id and argument values, from theRequestKeysobject.A instance of WebEventHandleris usually attached to aWebComponent, the brick for building a Web application. Web applications are allowed to dynamically add aWebEventto aWebEventHandlerinstance at the run time by providing the XML representation of theWebEvent.- Since:
- MicroStrategy Web 7.3.1 or earlier
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEvent(WebEvent event)AddsWebEventinto the current event handler.voidaddEventsFromXML(java.lang.String eventsXML)Adds one or moreWebEventinto the current event handler.voidappendRemainingEvent(WebEvent event)Append an remaining event at the end of the remaining events' list.
 Such remaining event will be processed at the end.booleandelegateRequest(RequestKeys keys)This method encapsulates the mechanism by which a request is delegated to child WebComponents.intgetHandlerType()Returns thetypeof the currentWebEventHandle.SimpleListgetPendingEvents()Returns the list of events that were not processed.java.lang.ClassgetSupportedWebComponentType()Returns theClasstype of theWebComponentthis event handler is associated with.WebComponentgetWebComponent()Returns theWebComponentobject associated with the current event handler.WebEventgetWebEvent(int eventID)Returns the specifiedWebEventinstance which this event handler supports.java.util.EnumerationgetWebEvents()Returns an enumeration over theWebEventobjects suppored by this event handler.java.util.EnumerationgetWebEventsFromRequest(RequestKeys keys)Returns an enumeration over theWebEventsuppored by this event handler that are present in the request keys provided.booleanhandleRequest(RequestKeys keys)Handles theWebEventspecified in theRequestKeysobject.booleanprocessRequest(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 (seeprocessRequest(RequestKeys)).voidsetWebComponent(WebComponent component)Sets aWebComponentinstance on this WebEventHandler.
 
- 
- 
- 
Method Detail- 
getWebEventWebEvent getWebEvent(int eventID) Returns the specifiedWebEventinstance which this event handler supports.- Parameters:
- eventID- the event id of the WebEvent.
- Returns:
- the specified WebEvent; null if the event is not supported by this event handler.
 
 - 
handleRequestboolean handleRequest(RequestKeys keys) throws WebException Handles theWebEventspecified in theRequestKeysobject. By default, this method invokesprocessRequest(RequestKeys)followed bydelegateRequest(RequestKeys). In most cases, onlyprocessRequestis implemented (or overridden) to provide the event processing logic.- Parameters:
- keys- the RequestKeys object containing event ID, sources, and any other information.
- Returns:
- true if handling succeeds in processRequestor one of its children.
- Throws:
- WebException- thrown if handling of the request fails.
 
 - 
processRequestboolean processRequest(RequestKeys keys) throws WebException This method encapsulates the logic to process incoming events without regard as to how it was triggered or be concerned with delegation the request (seeprocessRequest(RequestKeys)). Normally, this is invoked byhandleRequest(RequestKeys).- Parameters:
- keys- the RequestKeys object containing event ID, sources, and any other information.
- Returns:
- true if handling succeeds; false if the event is ignored and not handled.
- Throws:
- WebException- thrown if handling of the request fails.
 
 - 
delegateRequestboolean delegateRequest(RequestKeys keys) throws WebException 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 byprocessRequest(RequestKeys). Normally, this is invoked byhandleRequest(RequestKeys). The request keys must also define an event ID otherwise the event will not be propagated.- Parameters:
- keys- the RequestKeys object containing event ID, sources, and any other information.
- Returns:
- true if handling succeeds in processRequestor one of its children.
- Throws:
- WebException- thrown if handling of the request fails.
 
 - 
getWebComponentWebComponent getWebComponent() Returns theWebComponentobject associated with the current event handler.- Returns:
- the WebComponent object.
 
 - 
setWebComponentvoid setWebComponent(WebComponent component) Sets aWebComponentinstance 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 ofWebEventHandler, and the event handler instance previously associate the specifiedWebComponentshould have a nullWebComponent.- Parameters:
- component- a new WebComponent object.
 
 - 
addEventsFromXMLvoid addEventsFromXML(java.lang.String eventsXML) Adds one or moreWebEventinto the current event handler.- Parameters:
- eventsXML- the XML representation of web events.
 
 - 
addEventvoid addEvent(WebEvent event) AddsWebEventinto 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- Parameters:
- event- the event to be added
 
 - 
getHandlerTypeint getHandlerType() Returns thetypeof the currentWebEventHandle.- Returns:
- the type of the current event handler.
 
 - 
getWebEventsjava.util.Enumeration getWebEvents() Returns an enumeration over theWebEventobjects suppored by this event handler. TheWebEventobjects are returned in no particular order.- Returns:
- an Enumeration over the WebEventobjects supported.
 
 - 
getWebEventsFromRequestjava.util.Enumeration getWebEventsFromRequest(RequestKeys keys) Returns an enumeration over theWebEventsuppored by this event handler that are present in the request keys provided. TheWebEventare returned in no particular order.- Parameters:
- keys- the- RequestKeysobject.
- Returns:
- an Enumeration over the WebEventsupported.
 
 - 
getSupportedWebComponentTypejava.lang.Class getSupportedWebComponentType() Returns theClasstype of theWebComponentthis event handler is associated with.- Returns:
- the Classof theWebComponentthis event handler is associated with.
 
 - 
getPendingEventsSimpleList getPendingEvents() 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.- Returns:
- a List with the events that were not processed during handleRequest(). IfhandelRequest()was not invoked, it returns null.
 
 - 
appendRemainingEventvoid appendRemainingEvent(WebEvent event) Append an remaining event at the end of the remaining events' list.
 Such remaining event will be processed at the end.- Parameters:
- event- the- WebEventobject.
 
 
- 
 
-