public class

ControllerHelper

extends Object
java.lang.Object
   ↳ com.microstrategy.web.controller.ControllerHelper

Summary

Nested Classes
class ControllerHelper.BlockLibraryInfo A simple class that records information about the Block Library loaded into the BlockFactory. 
Public Constructors
ControllerHelper()
Public Methods
static void dispenseWebAPIErrorProperties(AppContext appContext)
Initialize web API error properties.
static Preferences getAdminPrefs()
Return a instance of system administrator Preferences.
static String getLocalesXMLPath(AppContext appContext)
Resolve and return the full path to the locales.xml file.
static String getRequiredParameter(AppContext appContext, String name)
Retrieve the configuration parameter.
static boolean getSessionCookieUsage(Preferences adminPrefs)
Return whether uses session cookies as a system admin preferences.
static void handleBinaryPage(ContainerServices cs, PageComponent page)
Handle binary page by generating the content of the binary page back to client browser.
static void initializeAppEventHandlers(AppContext appContext, String paramName)
This method is deprecated. although still honored, the appBeanEventsFile should not be used anymore. You can change the eventsFile instaed.
static ControllerHelper.BlockLibraryInfo initializeBlockFactory(AppContext appContext, String paramName)
Initialize the Block Factory with the library to be used by the application.
static BrowserSettings initializeBrowserSettings(PageManager pageMgr, Preferences adminPrefs, ContainerServices cs)
Create and initialize a BrowserSetting object.
static void initializeCacheConfig(AppContext appContext)
Initialize by reading and configuring the CacheRegistry from cache configuration properties file.
static void initializeClientLog(AppContext appContext, String levelParam, String modeParam, String typeParam, String fileParam, String pageParam, String formParam)
Initialize and set up client logging system.
static void initializeCustomLogging(AppContext appContext)
Initialize the custom logging for the application.
static void initializeDefaultLogging(AppContext appContext, String paramPropertiesFile, String resourceName, String paramFilesDefaultLocation)
Initialize the default logging system.
static DynamicMenus initializeDynamicMenus(AppContext appContext, String paramName)
This method is deprecated. DynamicMenus should be retrieved from pageConfig.
static PageComponent initializeErrorPage(AppContext appContext, WebComponent servletWebComponent)
This method is deprecated. It is not used anywhere in the application.
static void initializeExternalSecurityClass(AppContext appContext, String paramName)
This method is deprecated. This method is not used anyrmore, the initializeExternalSecurityComponent(AppContext) will now throw an Exception if the external security parameter is specified and the corresponding class cannot be instantiated.
static ExternalSecurity initializeExternalSecurityComponent(AppContext appContext)
Create and initialize a external security component.
static WebFeatures initializeFeatures(AppContext appContext)
Create and initialize the globabl feature.
static void initializeFormatPropertiesMapping(AppContext appContext)
Initialize and read in the formatting properties mapping information from formatting properties configuration file.
static void initializeFormatter(AppContext appContext)
Initialize the formatter by reading in format information for various locales from formatting configuration file.
static void initializeJavaScriptDependencyAnalyzer(AppContext appContext)
static MessagesManager initializeMessagesManager(AppContext appContext, String paramName)
Initialize the messages manager from the configuration file specified by the parameter.
static void initializeObjBrowserFolderLinks(AppContext appContext)
This method is deprecated. This is method is not used anymore. Object browser folder links can now be accessed through the Page configuration.
static PageManager initializePageManager(AppContext appContext, String paramName, String resourceName)
This method is deprecated. The PageManager needs not initialized any
static PageManager initializePageManager(AppContext appContext, String paramName)
This method is deprecated. The PageManager needs not initialized any
static void initializePrefsGroups(AppContext appContext, String paramName)
static RequestKeys initializeRequestKeys(ContainerServices cs)
Create and initialize a new request keys.
static void initializeSDKEventHandlers(AppContext appContext, String paramName)
This method is deprecated. although still honored, the mdBeanEventsFile should not be used anymore. You can change the eventsFile instaed.
static void initializeSSL(AppContext appContext)
static ServletWebComponent initializeServletWebComponent(AppContext appContext, Preferences adminPrefs, String name)
Create and initialize a ServletWebComponent.
static void initializeStdOutRedirect(AppContext appContext)
static StyleCatalog initializeStyleCatalog(AppContext appContext, String paramName, String resourceName)
This method is deprecated. The StyleCatalog needs not to be initialized any
static void initializeSubscriptionSetup(AppContext appContext, String engineParam, String portalParam, String apiParam, String apiTemplateParam, String folderParam)
Initialize and set up subscription from configuration file.
static void initializeSysAdminPrefs(AppContext appContext, String paramName)
Initialize the system administrator preferences by making sure there is a copy of definition file at the location specified by the parameter.
static void initializeSysServerDefaultPrefs(AppContext appContext, String paramName)
Initialize the admin setting preperences configuration file specified by a parameter.
static void initializeWidgetFactory(AppContext appContext, String paramName)
This method is deprecated. Use initializeBlockFactory(AppContext, String) instead.
static boolean isCookiesEnabled(Preferences adminPrefs)
Determine whether the cookies is enabled as admin preference.
static boolean isIframeJSPValid(AppContext appContext, String paramName, String resourceName)
static Document loadConfigDocument(AppContext appContext, String name)
Load and return the configuration document specified by a parameter.
static void reloadLoggingProperties()
Reload logging properties.
static String resolveFilePathParameter(AppContext appContext, String defaultFile, String paramName)
Resolve and return the full path of the file specified by a parameter.
static String resolveLogPathParameter(AppContext appContext, String defaultFile, String paramName)
Resolve and return the log path value based on parameter value.
static void savePreferences(AppContext appContext, Preferences adminPrefs, PageComponent page)
Save system admin preferences to persistent storage.
static void saveSessionManager(AppContext appContext, boolean useSessionCookie, String sessKey)
Save session manager state to either session attribute or to client cookie identified by the key.
static void setEncryption(Preferences adminPrefs)
Set up whether to use encryption for WebClusterAdmin by reading from system admin preferences.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ControllerHelper ()

Public Methods

public static void dispenseWebAPIErrorProperties (AppContext appContext)

Initialize web API error properties.

public static Preferences getAdminPrefs ()

Return a instance of system administrator Preferences.

public static String getLocalesXMLPath (AppContext appContext)

Resolve and return the full path to the locales.xml file.

Parameters
appContext application context object
Returns
  • the full path

public static String getRequiredParameter (AppContext appContext, String name)

Retrieve the configuration parameter.

Parameters
appContext Application Context
name The name of the target parameter
Returns
  • The parameter value

public static boolean getSessionCookieUsage (Preferences adminPrefs)

Return whether uses session cookies as a system admin preferences.

Parameters
adminPrefs Admin preferences to read from.

public static void handleBinaryPage (ContainerServices cs, PageComponent page)

Handle binary page by generating the content of the binary page back to client browser.

Parameters
cs container service to be used to send content back to browser
page the PageComponent corresponding to the binary page

public static void initializeAppEventHandlers (AppContext appContext, String paramName)

This method is deprecated.
although still honored, the appBeanEventsFile should not be used anymore. You can change the eventsFile instaed.

Initializes app Eventhandler factory using the value of the given parameter.

public static ControllerHelper.BlockLibraryInfo initializeBlockFactory (AppContext appContext, String paramName)

Initialize the Block Factory with the library to be used by the application.

Parameters
appContext The AppContext instance necessary for initialization.
paramName The name of the init parameter that defines the Block Library path.
Returns

public static BrowserSettings initializeBrowserSettings (PageManager pageMgr, Preferences adminPrefs, ContainerServices cs)

Create and initialize a BrowserSetting object.

Parameters
pageMgr Pagemanager
adminPrefs Admin Preferences
cs ContainerServices
Returns
  • BrowserSetting object created

public static void initializeCacheConfig (AppContext appContext)

Initialize by reading and configuring the CacheRegistry from cache configuration properties file.

Parameters
appContext application context object

public static void initializeClientLog (AppContext appContext, String levelParam, String modeParam, String typeParam, String fileParam, String pageParam, String formParam)

Initialize and set up client logging system.

Parameters
appContext application context object

public static void initializeCustomLogging (AppContext appContext)

Initialize the custom logging for the application.

Parameters
appContext application context object

public static void initializeDefaultLogging (AppContext appContext, String paramPropertiesFile, String resourceName, String paramFilesDefaultLocation)

Initialize the default logging system.

Parameters
appContext application context object
paramPropertiesFile Par

public static DynamicMenus initializeDynamicMenus (AppContext appContext, String paramName)

This method is deprecated.
DynamicMenus should be retrieved from pageConfig.

public static PageComponent initializeErrorPage (AppContext appContext, WebComponent servletWebComponent)

This method is deprecated.
It is not used anywhere in the application.

public static void initializeExternalSecurityClass (AppContext appContext, String paramName)

This method is deprecated.
This method is not used anyrmore, the initializeExternalSecurityComponent(AppContext) will now throw an Exception if the external security parameter is specified and the corresponding class cannot be instantiated.

public static ExternalSecurity initializeExternalSecurityComponent (AppContext appContext)

Create and initialize a external security component.

Parameters
appContext application context object
Returns
  • External security component created

public static WebFeatures initializeFeatures (AppContext appContext)

Create and initialize the globabl feature.

Parameters
appContext application context object
Returns
  • Global Features

public static void initializeFormatPropertiesMapping (AppContext appContext)

Initialize and read in the formatting properties mapping information from formatting properties configuration file.

public static void initializeFormatter (AppContext appContext)

Initialize the formatter by reading in format information for various locales from formatting configuration file.

Parameters
appContext application context object

public static void initializeJavaScriptDependencyAnalyzer (AppContext appContext)

public static MessagesManager initializeMessagesManager (AppContext appContext, String paramName)

Initialize the messages manager from the configuration file specified by the parameter.

Parameters
appContext application context object
paramName the name of the parameter
Returns
  • MessagesManager

public static void initializeObjBrowserFolderLinks (AppContext appContext)

This method is deprecated.
This is method is not used anymore. Object browser folder links can now be accessed through the Page configuration.

public static PageManager initializePageManager (AppContext appContext, String paramName, String resourceName)

This method is deprecated.
The PageManager needs not initialized any

This method has been deprecated. The PageManager is now cached through the ConfigurationFilesCache which is responsible for loading, initializing and applying customizations. The AppContext will get the PageManager instance directly from the Cache so the controller needs not to call this method to initialize it.

To get the instance of the pageManager from the cache:
_pageManager = (PageManager) ConfigurationFilesCache.getConfiguration(path, PageManager.class);

public static PageManager initializePageManager (AppContext appContext, String paramName)

This method is deprecated.
The PageManager needs not initialized any

This method has been deprecated. The PageManager is now cached through the ConfigurationFilesCache which is responsible for loading, initializing and applying customizations. The AppContext will get the PageManager instance directly from the Cache so the controller needs not to call this method to initialize it.

To get the instance of the pageManager from the cache:
_pageManager = (PageManager) ConfigurationFilesCache.getConfiguration(path, PageManager.class);

public static void initializePrefsGroups (AppContext appContext, String paramName)

public static RequestKeys initializeRequestKeys (ContainerServices cs)

Create and initialize a new request keys.

Parameters
cs Container Service
Returns
  • RequestKeys created

public static void initializeSDKEventHandlers (AppContext appContext, String paramName)

This method is deprecated.
although still honored, the mdBeanEventsFile should not be used anymore. You can change the eventsFile instaed.

Initializes SDK Eventhandler factory using the value of the given parameter.

public static void initializeSSL (AppContext appContext)

public static ServletWebComponent initializeServletWebComponent (AppContext appContext, Preferences adminPrefs, String name)

Create and initialize a ServletWebComponent.

Parameters
appContext application context object
adminPrefs admin preference to read information to initialize the ServletWebComponent.
name the name to be used as the name of the ServletWebComponent
Returns
  • ServletWebComponent created

public static void initializeStdOutRedirect (AppContext appContext)

public static StyleCatalog initializeStyleCatalog (AppContext appContext, String paramName, String resourceName)

This method is deprecated.
The StyleCatalog needs not to be initialized any

This method has been deprecated. The StyleCatalog is now cached through the ConfigurationFilesCache which is responsible for loading, initializing and applying customizations. The AppContext will get the StyleCatalog instance directly from the Cache so the controller needs not to call this method to initialize it.

To get the instance of the pageManager from the cache:
_styleCatalog = (StyleCatalog) ConfigurationFilesCache.getConfiguration(path, StyleCatalogImpl.class);

public static void initializeSubscriptionSetup (AppContext appContext, String engineParam, String portalParam, String apiParam, String apiTemplateParam, String folderParam)

Initialize and set up subscription from configuration file.

Parameters
appContext application context object

public static void initializeSysAdminPrefs (AppContext appContext, String paramName)

Initialize the system administrator preferences by making sure there is a copy of definition file at the location specified by the parameter.

Parameters
appContext application context object
paramName Parameter Name

public static void initializeSysServerDefaultPrefs (AppContext appContext, String paramName)

Initialize the admin setting preperences configuration file specified by a parameter.

Parameters
appContext application context object
paramName the name of the parameter to be read

public static void initializeWidgetFactory (AppContext appContext, String paramName)

This method is deprecated.
Use initializeBlockFactory(AppContext, String) instead.

Initialize the Blocks used by the application.

Parameters
appContext The AppContext instance necessary for initialization.
paramName The name of the init parameter that defines the Block Library path.

public static boolean isCookiesEnabled (Preferences adminPrefs)

Determine whether the cookies is enabled as admin preference.

public static boolean isIframeJSPValid (AppContext appContext, String paramName, String resourceName)

public static Document loadConfigDocument (AppContext appContext, String name)

Load and return the configuration document specified by a parameter.

Parameters
appContext Application Context
name The name of the parameter
Returns
  • Document object

public static void reloadLoggingProperties ()

Reload logging properties.

public static String resolveFilePathParameter (AppContext appContext, String defaultFile, String paramName)

Resolve and return the full path of the file specified by a parameter.

Parameters
appContext Application Context
defaultFile The default file path
paramName The name of the parameter
Returns
  • The full path of the file

public static String resolveLogPathParameter (AppContext appContext, String defaultFile, String paramName)

Resolve and return the log path value based on parameter value.

public static void savePreferences (AppContext appContext, Preferences adminPrefs, PageComponent page)

Save system admin preferences to persistent storage.

Parameters
appContext application context object
adminPrefs admin preference to read information

public static void saveSessionManager (AppContext appContext, boolean useSessionCookie, String sessKey)

Save session manager state to either session attribute or to client cookie identified by the key.

Parameters
appContext application context
useSessionCookie a boolean value of whether use cookie or session as storage
sessKey the key/name of session attribute or cookie

public static void setEncryption (Preferences adminPrefs)

Set up whether to use encryption for WebClusterAdmin by reading from system admin preferences.

Parameters
adminPrefs Admin preferences to read from.