Interface ContainerServicesContext

    • Method Summary

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

      • getRealPath

        java.lang.String getRealPath​(java.lang.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 FileLoader.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.
        See Also:
        FileLoader.getRealPath(String)
      • getResourceAsStream

        java.io.InputStream getResourceAsStream​(java.lang.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.
      • getInitParameterNames

        java.util.Enumeration<java.lang.String> getInitParameterNames()
        Returns enumeration of initialization parameter names
        Returns:
        enumeration of initialization parameter names
      • getInitParameter

        java.lang.String getInitParameter​(java.lang.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
      • getApplicationParameters

        ApplicationParameters getApplicationParameters()
        Returns the an ApplicationParameters instance that includes all the parameters defined in the microstrategy.xml or web.xml file
      • getControllerParameter

        java.lang.String getControllerParameter​(java.lang.String paramName,
                                                java.lang.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
      • initGlobalObjects

        void initGlobalObjects()
        Initializes global instances, like FileLoader and Plugins, using this ContainerServices instance.
      • getResource

        java.net.URL getResource​(java.lang.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 File). Note that many URL implementations are read-only.
        Parameters:
        relPath - relative path.
        Returns:
        URL associated with given path.
      • getResourcePaths

        java.util.Set<java.lang.String> getResourcePaths​(java.lang.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
      • getContextPath

        java.lang.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.