public class

GenericWebAppController

extends AppControllerImpl
java.lang.Object
   ↳ com.microstrategy.web.controller.AppControllerImpl
     ↳ com.microstrategy.web.controller.GenericWebAppController
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This class provides a generic implementation of AppController that suits many MicroStrategy web applications. This class contains much of the code from the MSTRWebController class.

Summary

Constants
String SESSION_SESSION_MANAGER The key to use for the Session Manager.
Fields
protected ControllerHelper.BlockLibraryInfo _blockLibraryInfo
protected String _configServletPath
protected int _defaultEvent
protected AppContext _globalAppContext
protected String _iframeJSP
protected String _iserverPollingFreq
protected long _messagesLastModified This field is deprecated. MessagesBundle will take care themselves to reload if necessary.
protected MessagesManager _messagesManager This field is deprecated. Get the pageManager from getMessagesManager() or directly from the ConfigurationFilesCache.
protected long _pageConfigLastModified This field is deprecated. the pageConfig will take care itself to reload if necessary.
protected PageManager _pageManager This field is deprecated. Get the pageManager from getPageManager() or directly from the ConfigurationFilesCache.
protected boolean _reloadConfigFiles
protected String _servletName This field is deprecated. This variable should be marked private and will be removed in future versions of the product. You can call getBaseURL(ContainerServices) instead.
protected String _servletPath This field is deprecated. This variable should be marked private and will be removed in future versions of the product. You can call getServletPath() instead.
protected StyleCatalog _styleCatalog This field is deprecated. Get the style catalog from getStyleCatalog() or directly from the ConfigurationFilesCache.
protected long _styleCatalogLastModified This field is deprecated. the styleCatalog will take care itself to reload if necessary.
protected String _xhrJSP
Public Constructors
GenericWebAppController()
Public Methods
AppContext createNewAppContext(ContainerServices cs)
This method is deprecated. Use createNewAppContext(ContainerServices, boolean) instead.
AppContext createNewAppContext(ContainerServices cs, boolean externalApp)
Creates a new AppContextInstance.
void errorAfterRedirect(RequestState reqState, Exception e)
String extractParameterFromURL(String url, String parameterName)
String getBaseURL(ContainerServices cs)
String getPage(RequestState reqState)
void initializeApp(ContainerServices cs)
ExternalSecurity newExternalSecurity()
RequestState newRequestState()
boolean processRequest(RequestState reqState)
void terminateApp()
Subclasses that override this method should invoke this via super.terminateApp to ensure threads and other application related resources are cleaned up properly.
Protected Methods
void addStandardCacheHeaders(ContainerServices cs)
ProductLicenseInfo[] getApplicableLicenses()
String getDefaultURLLink(ServletWebComponent servletWebComponent)
long getLastModifiedTime(AppContext appContext, String param)
This method is deprecated. No longer used by the MicroStrategy Web controllers.
void setupSessionManager(AppContext appContext, ServletWebComponent servletWebComponent)
boolean validateRandomNum(ContainerServices cs, AppContext appContext)
[Expand]
Inherited Methods
From class com.microstrategy.web.controller.AppControllerImpl
From class java.lang.Object
From interface com.microstrategy.web.controller.AppController

Constants

protected static final String SESSION_SESSION_MANAGER

The key to use for the Session Manager.

Constant Value: "mstrSmgr"

Fields

protected ControllerHelper.BlockLibraryInfo _blockLibraryInfo

protected String _configServletPath

protected int _defaultEvent

protected AppContext _globalAppContext

protected String _iframeJSP

protected String _iserverPollingFreq

protected long _messagesLastModified

This field is deprecated.
MessagesBundle will take care themselves to reload if necessary.

protected MessagesManager _messagesManager

This field is deprecated.
Get the pageManager from getMessagesManager() or directly from the ConfigurationFilesCache.

This used to be the instance of the MessagesManager used by this Controller. The Controller would initialized this instance in the initializeApp method, keep a reference and then assign it to the AppContext on every request.

Now all configuration files are cached by the ConfigurationFilesCache, so if you need to access the page config, you can get a reference (based on the file path) from this Cache. The AppContextImpl will automatically try to get the MessagesManager from the Cache if a PageManager is not explicitly set.

protected long _pageConfigLastModified

This field is deprecated.
the pageConfig will take care itself to reload if necessary.

protected PageManager _pageManager

This field is deprecated.
Get the pageManager from getPageManager() or directly from the ConfigurationFilesCache.

This used to be the instance of the PageManager used by this Controller. The Controller would initialized this instance in the initializeApp method, keep a reference and then assign it to the AppContext on every request.

Now all configuration files are cached by the ConfigurationFilesCache, so if you need to access the page config, you can get a reference (based on the file path) from this Cache. The AppContextImpl will automatically try to get the PageManager from the Cache if a PageManager is not explicitly set.

protected boolean _reloadConfigFiles

protected String _servletName

This field is deprecated.
This variable should be marked private and will be removed in future versions of the product. You can call getBaseURL(ContainerServices) instead.

protected String _servletPath

This field is deprecated.
This variable should be marked private and will be removed in future versions of the product. You can call getServletPath() instead.

protected StyleCatalog _styleCatalog

This field is deprecated.
Get the style catalog from getStyleCatalog() or directly from the ConfigurationFilesCache.

This used to be the instance of the StyleCatalog used by this Controller. The Controller would initialized this instance in the initializeApp method, keep a reference and then assign it to the AppContext on every request.

Now all configuration files are cached by the ConfigurationFilesCache, so if you need to access the style catalog, you can get a reference (based on the file path) from this Cache. The AppContextImpl will automatically try to get the StyleCatalog from the Cache if a StyleCatalog is not explicitly set.

protected long _styleCatalogLastModified

This field is deprecated.
the styleCatalog will take care itself to reload if necessary.

protected String _xhrJSP

Public Constructors

public GenericWebAppController ()

Public Methods

public AppContext createNewAppContext (ContainerServices cs)

This method is deprecated.
Use createNewAppContext(ContainerServices, boolean) instead.

Creates a new AppContext instance.

Parameters
cs The ContainerServices instance of the caller.
Returns

public AppContext createNewAppContext (ContainerServices cs, boolean externalApp)

Creates a new AppContextInstance.

Parameters
cs The ContainerServices instance of the caller.
externalApp If this is being called from an external application (one other than MicroStrategy Web), then the following properties are set on the new instance:
  • styleCatalog
  • pageManager
  • messagesManager
This allows the external application to reuse the settings of the MicroStrategy Web application.

public void errorAfterRedirect (RequestState reqState, Exception e)

public String extractParameterFromURL (String url, String parameterName)

public String getBaseURL (ContainerServices cs)

public String getPage (RequestState reqState)

public void initializeApp (ContainerServices cs)

public ExternalSecurity newExternalSecurity ()

public RequestState newRequestState ()

public boolean processRequest (RequestState reqState)

public void terminateApp ()

Subclasses that override this method should invoke this via super.terminateApp to ensure threads and other application related resources are cleaned up properly.

Protected Methods

protected void addStandardCacheHeaders (ContainerServices cs)

protected ProductLicenseInfo[] getApplicableLicenses ()

protected String getDefaultURLLink (ServletWebComponent servletWebComponent)

protected long getLastModifiedTime (AppContext appContext, String param)

This method is deprecated.
No longer used by the MicroStrategy Web controllers.

Gets teh last modified time of a resource.

Parameters
appContext The AppContext to use for resolving resource parameters.
param The name of the resource to check.
Returns
  • A long value for the last modified time.

protected void setupSessionManager (AppContext appContext, ServletWebComponent servletWebComponent)

protected boolean validateRandomNum (ContainerServices cs, AppContext appContext)

Throws
WebException