public interface

AppGlobalContext

com.microstrategy.web.platform.AppGlobalContext
Known Indirect Subclasses

Class Overview

This interface represents the global information of an application. An application could save this at its global level to let each request access them. Currently, this interface is only used by ASP(x) application.

This interface is not thread-safe. The correct usage would be to set this object up in one thread. After it has been set up, all threads should only read information from this object.

This class is not responsible anymore for loading init parameters from "web.xml" or "microstrategy.xml" Now, this is done by the ApplicationParameters. To get the value of an init parameter, get the instance of this class from the com.microstrategy.utils.config.ConfigurationFilesCache and use the getParameter method, for example:

   ApplicationParameters appParams = (ApplicationParameters) ConfigurationFilesCache.getConfiguration("/WEB-INF/microstrategy.xml", ApplicationParameters.class);

   String value = appParams.getParameter("parameter", "servlet");
 

Summary

Public Methods
abstract String getApplicationPath()
Returns the application's path.
abstract String getBasePath()
Returns current application's base path.
abstract String getInitParameter(String paramName)
This method is deprecated. The AppGlobalContext is not responsible to load init parameters.Use ContainerServices instead.
abstract Enumeration getInitParameterNames()
This method is deprecated. The AppGlobalContext is not responsible to load init parameters.
abstract String getRequestServerName()
Returns the request server name.
abstract String getServletName()
This method is deprecated. The AppGlobalContext should not hold the servlet name
abstract void loadInitParameters(String relPath, String servletName)
This method is deprecated. The AppGlobalContext is not responsible to load init parameters. We don't need this method anymore. The implementation of ContainerServices is responsible for loading init parameters.
abstract void setApplicationPath(String applPath)
Sets the application's base URL used to build link and form URLs.
abstract void setBasePath(String basePath)
Sets the base path for loading different application resources.
abstract void setRequestServerName(String serverName)
Sets the request server name

Public Methods

public abstract String getApplicationPath ()

Returns the application's path.

Returns
  • The current application's path.
Throws
IllegalStateException thrown when the application path has not been set.

public abstract String getBasePath ()

Returns current application's base path.

Returns
  • The curretn application's base path.
Throws
IllegalStateException thrown when the application's base path has not been set.

public abstract String getInitParameter (String paramName)

This method is deprecated.
The AppGlobalContext is not responsible to load init parameters.Use ContainerServices instead.

Returns initialization parameter value

Parameters
paramName parameter name
Returns
  • parameter value

public abstract Enumeration getInitParameterNames ()

This method is deprecated.
The AppGlobalContext is not responsible to load init parameters.

Returns enumeration of initialization parameter names

Returns
  • enumeration of initialization parameter names
See Also

public abstract String getRequestServerName ()

Returns the request server name.

Returns
  • The request server name.
Throws
IllegalStateException thrown when the server name has not been set.

public abstract String getServletName ()

This method is deprecated.
The AppGlobalContext should not hold the servlet name

Returns the name of the servlet used to initialized this AppGlobalContext.

public abstract void loadInitParameters (String relPath, String servletName)

This method is deprecated.
The AppGlobalContext is not responsible to load init parameters. We don't need this method anymore. The implementation of ContainerServices is responsible for loading init parameters.

Loads servlet's initialization parameters from the web.xml

Parameters
relPath relative path to the xml file containig parameters (include the xml name)
servletName servlet name

public abstract void setApplicationPath (String applPath)

Sets the application's base URL used to build link and form URLs.

Parameters
applPath application path

public abstract void setBasePath (String basePath)

Sets the base path for loading different application resources.

Parameters
basePath a path to a root directory of application resources. All resource pathes are resolved relative to this path.

public abstract void setRequestServerName (String serverName)

Sets the request server name

Parameters
serverName The server who serves the request.