public class

ServletWebComponent

extends AbstractPersistableAppComponent
java.lang.Object
   ↳ com.microstrategy.utils.serialization.AbstractPersistable
     ↳ com.microstrategy.web.beans.AbstractTransformable
       ↳ com.microstrategy.web.beans.AbstractWebComponent
         ↳ com.microstrategy.web.app.beans.AbstractAppComponent
           ↳ com.microstrategy.web.app.beans.AbstractPersistableAppComponent
             ↳ com.microstrategy.web.app.beans.ServletWebComponent

Class Overview

This class implements the WebComponent interface for having its methods available to the application Servlet.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.beans.AbstractPersistableAppComponent
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
From interface com.microstrategy.web.app.beans.AppComponent
[Expand]
Inherited Fields
From class com.microstrategy.web.beans.AbstractWebComponent
From class com.microstrategy.web.beans.AbstractTransformable
Public Constructors
ServletWebComponent()
Creates a new ServletWebComponent with default parameters.
ServletWebComponent(String name)
Creates a new ServletWebComponent with default parameters but a custom name.
Public Methods
MarkupOutput generateOutput()
This Component is not used to generate output.
String getCurrentPort()
Returns the port of the current session
String getCurrentProject()
Returns the project of the current session
String getCurrentServer()
Returns the server of the current session
PageComponent getPage()
Gets the PageComponent (already initialized) to be used by this servlet.
PageHistoryList getPageHistoryList()
SimpleList getPendingEvents()
Returns the list of events that were not processed.
boolean isEventWait()
boolean isOpen()
Overrides isOpen by always returning true: there is no reason why would the servlet be closed.
void saveLastSuccesfulPage()
Saves the information of the last succesful page so it can be restored by the cancel event.
void saveLastSuccesfulPage(PageComponent page)
Saves the information of the last succesful page so it can be restored by the cancel event.
void setIsOpen(boolean value)
This is an illegal method: the servlet should never get closed.
void switchPage(String pageName)
Replaces the current page in the Servlet with the indicated page
Protected Methods
void doFlatState(FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)
Proceses the save/restore state opperation of the AppComponent
WebEventHandler newDefaultEventHandler()
[Expand]
Inherited Methods
From class com.microstrategy.web.app.beans.AbstractPersistableAppComponent
From class com.microstrategy.web.app.beans.AbstractAppComponent
From class com.microstrategy.web.beans.AbstractWebComponent
From class com.microstrategy.web.beans.AbstractTransformable
From class com.microstrategy.utils.serialization.AbstractPersistable
From class java.lang.Object
From interface com.microstrategy.utils.serialization.Persistable
From interface com.microstrategy.web.app.beans.AppComponent
From interface com.microstrategy.web.beans.RequestPersistable
From interface com.microstrategy.web.beans.Transformable
From interface com.microstrategy.web.beans.WebComponent

Public Constructors

public ServletWebComponent ()

Creates a new ServletWebComponent with default parameters.
This ServletWebComponent uses "mstrWeb" as its name, ServletEventHandlerImpl (which implements ServletEventHandler) as its event handler and has no parent.

public ServletWebComponent (String name)

Creates a new ServletWebComponent with default parameters but a custom name.
This ServletWebComponent uses ServletEventHandlerImpl (which implements ServletEventHandler) as its event handler and has no parent.

Public Methods

public MarkupOutput generateOutput ()

This Component is not used to generate output.

Returns
  • null value.

public String getCurrentPort ()

Returns the port of the current session

Returns
  • a String value with the current port number

public String getCurrentProject ()

Returns the project of the current session

Returns
  • a String value with the current project name

public String getCurrentServer ()

Returns the server of the current session

Returns
  • a String value with the current server name

public PageComponent getPage ()

Gets the PageComponent (already initialized) to be used by this servlet.

Returns

public PageHistoryList getPageHistoryList ()

Returns
  • The Page History List object

public SimpleList getPendingEvents ()

Returns the list of events that were not processed.
This list is retrieved directly from the EventHandler, since it's its responsibility. For this to happen the event handler needs to extend ServletEventHandler.

Returns
  • a List with the events that were not processed during handleRequest().

public boolean isEventWait ()

public boolean isOpen ()

Overrides isOpen by always returning true: there is no reason why would the servlet be closed.

Returns
  • true

public void saveLastSuccesfulPage ()

Saves the information of the last succesful page so it can be restored by the cancel event.

public void saveLastSuccesfulPage (PageComponent page)

Saves the information of the last succesful page so it can be restored by the cancel event.

Parameters
page the page to save.

public void setIsOpen (boolean value)

This is an illegal method: the servlet should never get closed. If the argument received is false, this will throw an IllegalArgumentException

Parameters
value boolean

public void switchPage (String pageName)

Replaces the current page in the Servlet with the indicated page

Throws
WebBeanException
WebException
WebBeanException

Protected Methods

protected void doFlatState (FlatStateSerializer serializer, int howMuchState, FlatStateTokenizer tokenizer)

Proceses the save/restore state opperation of the AppComponent

Parameters
serializer an instance of the FlatStateSerializer object to use
howMuchState defines how much information needs to be saved
tokenizer an instance of the FlatStateTokenizer object to use

protected WebEventHandler newDefaultEventHandler ()