public interface

ContainerServicesContext

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

Class Overview

This interfaces exposes, in a generic fashion, the services of any web application container. Whether the container is a servlet engine (Java) or a non-Java server (such as IIS), the methods exposed by this interface allow the caller to be unaware of the actual provider and the mechanics behind those calls. This inteface encapsulates operations that are available in the application context.

Summary

Public Methods
abstract ApplicationParameters getApplicationParameters()
Returns the an ApplicationParameters instance that includes all the parameters defined in the microstrategy.xml or web.xml file
abstract String getContextPath()
Returns the context path.
abstract String getControllerParameter(String paramName, String controllerName)
Returns initialization parameter value for the given controller.
abstract String getInitParameter(String paramName)
Returns initialization parameter value for the controller associated with this ContainerServices.
abstract Enumeration<String> getInitParameterNames()
Returns enumeration of initialization parameter names
abstract String getRealPath(String relPath)
This is a low level API call to the outside world - it returns the real path to a server-side resource.
abstract URL getResource(String relPath)
Returns the URL associated with the given resource path.
abstract InputStream getResourceAsStream(String relPath)
This method returns the contents of a file resource relative to the web application as an input stream.
abstract Set<String> getResourcePaths(String relPath)
Returns a directory path strings of all the paths to resources within the application whose longest sub-path matches the supplied path.
abstract void initGlobalObjects()
Initializes global instances, like FileLoader and Plugins, using this ContainerServices instance.

Public Methods

public abstract ApplicationParameters getApplicationParameters ()

Returns the an ApplicationParameters instance that includes all the parameters defined in the microstrategy.xml or web.xml file

public abstract String getContextPath ()

Returns the context path. In the out of the box Web application deployment, this is usually "/MicroStrategy". Note that subclasses can override this implementation to return different context paths.

Returns
  • the context path.

public abstract String getControllerParameter (String paramName, String controllerName)

Returns initialization parameter value for the given controller. This value is typically read from the microstrategy.xml or web.xml file

Parameters
paramName parameter name
controllerName Name that identifies the controller (e.g. mstrWeb, mstrWebAdmin). null for global paramters.
Returns
  • parameter value

public abstract String getInitParameter (String paramName)

Returns initialization parameter value for the controller associated with this ContainerServices. If no controller has been associated, it returns a global value. This value is typically read from the microstrategy.xml or web.xml file. This value is read from the getApplicationParameters()

Parameters
paramName parameter name
Returns
  • parameter value

public abstract Enumeration<String> getInitParameterNames ()

Returns enumeration of initialization parameter names

Returns
  • enumeration of initialization parameter names

public abstract String getRealPath (String relPath)

This is a low level API call to the outside world - it returns the real path to a server-side resource. Exactly what is returned depends upon the underlying implementation. Note that this may be null if the path is inside an archived file. This call doesn't feature resource caching or MicroStrategy Web application's custom prefix (i.e. ABSOLUTE and RELATIVE) handling. Using getRealPath(String) may be more appropriate.

Parameters
relPath A String that indicates the relative path of the file.
Returns
  • A String that indicates the full path of the file.

public abstract URL getResource (String relPath)

Returns the URL associated with the given resource path. If the resource does not exist, null is returned (i.e. it cannot return a path to a new java.io.File). Note that many URL implementations are read-only.

Parameters
relPath relative path.
Returns
  • URL associated with given path.

public abstract InputStream getResourceAsStream (String relPath)

This method returns the contents of a file resource relative to the web application as an input stream.

This is ONLY required to support the Java environment, and in particular, only those Java environments where the WAR file is not expanded. This should return NULL in an ASP environment.

Parameters
relPath A String that indicates the relative path of the file.
Returns
  • A InputStream that contains the contents of the specified file.

public abstract Set<String> getResourcePaths (String relPath)

Returns a directory path strings of all the paths to resources within the application whose longest sub-path matches the supplied path.

Parameters
relPath sub-path to match
Returns
  • Set of directory paths

public abstract void initGlobalObjects ()

Initializes global instances, like FileLoader and Plugins, using this ContainerServices instance.