Class AppGlobalContextImpl

  • All Implemented Interfaces:
    AppGlobalContext

    public class AppGlobalContextImpl
    extends java.lang.Object
    implements AppGlobalContext
    The class AppGlobalContextImpl provides the default implementation of the interface AppGlobalContext which is applicable only to ASPx application.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Constructor Summary

      Constructors 
      Constructor Description
      AppGlobalContextImpl()
      The default constructor of this class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getApplicationPath()
      Returns the application path.
      java.lang.String getBasePath()
      Returns current application's base path.
      java.lang.String getInitParameter​(java.lang.String paramName)
      Returns initialization parameter value
      java.util.Enumeration getInitParameterNames()
      Returns enumeration of initialization parameter names
      java.lang.String getRequestServerName()
      Returns the request server name.
      java.lang.String getServletName()
      Returns the name of the servlet used to initialized this AppGlobalContext.
      void loadInitParameters​(java.lang.String relPath, java.lang.String servletName)
      Loads servlet's initialization parameters from the web.xml
      void setApplicationPath​(java.lang.String applPath)
      Sets the application's base URL used to build link and form URLs.
      void setBasePath​(java.lang.String basePath)
      Sets the base path for loading different application resources.
      void setRequestServerName​(java.lang.String serverName)
      Sets the request server name
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AppGlobalContextImpl

        public AppGlobalContextImpl()
        The default constructor of this class.
    • Method Detail

      • getApplicationPath

        public java.lang.String getApplicationPath()
        Returns the application path.
        Specified by:
        getApplicationPath in interface AppGlobalContext
        Returns:
        The current application's path.
        Throws:
        java.lang.IllegalStateException - thrown when the application path has not been set.
      • getInitParameter

        public java.lang.String getInitParameter​(java.lang.String paramName)
        Description copied from interface: AppGlobalContext
        Returns initialization parameter value
        Specified by:
        getInitParameter in interface AppGlobalContext
        Parameters:
        paramName - parameter name
        Returns:
        parameter value
        See Also:
        ContainerServices
      • getServletName

        public java.lang.String getServletName()
        Description copied from interface: AppGlobalContext
        Returns the name of the servlet used to initialized this AppGlobalContext.
        Specified by:
        getServletName in interface AppGlobalContext
        Since:
        MicroStrategy Web 9.0.0
      • getRequestServerName

        public java.lang.String getRequestServerName()
        Returns the request server name.
        Specified by:
        getRequestServerName in interface AppGlobalContext
        Returns:
        The request server name.
        Throws:
        java.lang.IllegalStateException - thrown when the server name has not been set.
      • setApplicationPath

        public void setApplicationPath​(java.lang.String applPath)
        Sets the application's base URL used to build link and form URLs.
        Specified by:
        setApplicationPath in interface AppGlobalContext
        Parameters:
        applPath - application path
      • setRequestServerName

        public void setRequestServerName​(java.lang.String serverName)
        Sets the request server name
        Specified by:
        setRequestServerName in interface AppGlobalContext
        Parameters:
        serverName - The server who serves the request.
      • setBasePath

        public void setBasePath​(java.lang.String basePath)
        Sets the base path for loading different application resources.
        Specified by:
        setBasePath in interface AppGlobalContext
        Parameters:
        basePath - a path to a root directory of application resources. All resource pathes are resolved relative to this path.
      • getBasePath

        public java.lang.String getBasePath()
        Returns current application's base path.
        Specified by:
        getBasePath in interface AppGlobalContext
        Returns:
        The curretn application's base path.
        Throws:
        java.lang.IllegalStateException - thrown when the application's base path has not been set.
      • loadInitParameters

        public void loadInitParameters​(java.lang.String relPath,
                                       java.lang.String servletName)
        Description copied from interface: AppGlobalContext
        Loads servlet's initialization parameters from the web.xml
        Specified by:
        loadInitParameters in interface AppGlobalContext
        Parameters:
        relPath - relative path to the xml file containig parameters (include the xml name)
        servletName - servlet name