Class MobileChunkedAppContext

  • All Implemented Interfaces:
    AppContext, BeanContext

    public class MobileChunkedAppContext
    extends java.lang.Object
    implements AppContext
    Since:
    MicroStrategy Web 8.1.2
    • Constructor Detail

      • MobileChunkedAppContext

        public MobileChunkedAppContext​(BeanContext bc)
    • Method Detail

      • dispenseFile

        public void dispenseFile​(java.lang.String realPath,
                                 java.lang.String resourcePath)
        Description copied from interface: AppContext
        Dispenses the master copy of the a resource file located in the classpath into the file indicated in the realpath
        Specified by:
        dispenseFile in interface AppContext
        Parameters:
        realPath - the destination of the resource file to dispense
        resourcePath - the resource file to dispense.
      • getBrowserLocaleId

        public java.lang.String getBrowserLocaleId()
        Description copied from interface: AppContext
        This method returns the Locale Id defined in web preferences as Language. If default, it'll return browser's locale Id instead.
        Specified by:
        getBrowserLocaleId in interface AppContext
        Returns:
        a String with the Locale ID.
      • getBrowserServerLocaleId

        public java.lang.String getBrowserServerLocaleId()
        Description copied from interface: AppContext
        This method returns the Locale associated with Date and Number format locale web preference.If default, it'll return browser's locale Id instead.
        Specified by:
        getBrowserServerLocaleId in interface AppContext
        Returns:
        a String with the Locale ID.
      • getConfigParameter

        public java.lang.String getConfigParameter​(java.lang.String param)
        Description copied from interface: AppContext
        Returns the value of a configuration parameter. Configuration parameters are defined in the web.xml file using the context-param and init-param tags.
        Specified by:
        getConfigParameter in interface AppContext
        Parameters:
        param - name of the parameter to retrieve
        Returns:
        the value of the parameter
      • getConfigServletPath

        public java.lang.String getConfigServletPath()
        Description copied from interface: AppContext
        Get the full application path to the Servlet as defined in the configuration file
        Specified by:
        getConfigServletPath in interface AppContext
        Returns:
        a String with the servlet path
      • getDocumentFromFileResource

        public org.w3c.dom.Document getDocumentFromFileResource​(java.lang.String filePath)
        Description copied from interface: AppContext
        This method returns a DOM Document from a file resource. The method works by attempting the following operations, in order:
        1. Try to call the same method on BeanContext first. If that succeeds, return.
        2. Next, it tries to get the real path to this file relative to the web application. If it retrieves a valid path, it again calls the BeanContext's version of this method. If it succeeds, it returns.
        3. At this point, we cannot resolve the reference as a physical file. We then try to use the ServletContext's getResourceAsInput method to retrieve the contents of the file as resource that may be embedded within a WAR file. If this succeeeds, we load the contents into a DOM document and return it.THIS IS ONLY POSSIBLE WITHIN A JAVA ENVIRONMENT.
        4. If we get to this step, then we return an Exception.
        Specified by:
        getDocumentFromFileResource in interface AppContext
        Parameters:
        filePath - The absolute or relative path to the file resource.
        Returns:
        the Document node that contains the file contents.
      • getFileContentsAsString

        public java.lang.String getFileContentsAsString​(java.lang.String filePath)
        Description copied from interface: AppContext
        Returns the contents of the resource file as string from the file path provided. it does not dispense the file
        Specified by:
        getFileContentsAsString in interface AppContext
        Parameters:
        filePath - location of the resource file (relative path)
        Returns:
        the contents of the resource file.
      • getFileContentsAsString

        public java.lang.String getFileContentsAsString​(java.lang.String filePath,
                                                        java.lang.String encoding)
        Description copied from interface: AppContext
        Returns the contents of the resource file as string from the file path provided using the named character encoding. it does not dispense the file
        Specified by:
        getFileContentsAsString in interface AppContext
        Parameters:
        filePath - location of the resource file (relative path)
        encoding - The name of a supported character encoding.
        Returns:
        the contents of the resource file.
      • getFontName

        public java.lang.String getFontName()
        Description copied from interface: AppContext
        Returns a string with the name of the fonts, or the list of fonts that a browser should use when rendering the page. This is usually retrieved from user Preferences
        Specified by:
        getFontName in interface AppContext
        Returns:
        a String with a comma separated list of the fonts to use in this page.
      • getFontSize

        public java.lang.String getFontSize()
        Description copied from interface: AppContext
        A string with the base font size to use, the string might contain the type of size (i.e, pt, px, etc.)
        Specified by:
        getFontSize in interface AppContext
        Returns:
        a string with size of the font to use
      • getPageManager

        public PageManager getPageManager()
        Description copied from interface: AppContext
        This method gets the PageManager object associated with this application context.
        Specified by:
        getPageManager in interface AppContext
        Returns:
        the (@link PageManager) object associates with this application context.
      • getRealPath

        public java.lang.String getRealPath​(java.lang.String filePath)
        Description copied from interface: AppContext
        Return the absolute path of th erelative path provided
        Specified by:
        getRealPath in interface AppContext
        Parameters:
        filePath - relative path to get the relative path from
        Returns:
        the absolute path
      • getResourceFileAsString

        public java.lang.String getResourceFileAsString​(java.lang.String filePath,
                                                        java.lang.String resourceFileName)
        Description copied from interface: AppContext
        Returns the contents of the resource file as string from the file path provided. If the resource cannot be found in the location, it will be dispensed
        Specified by:
        getResourceFileAsString in interface AppContext
        Parameters:
        filePath - location of the resource file (relative path)
        resourceFileName - resource file
        Returns:
        the contents of the resource file.
      • getResourcesFolder

        public java.lang.String getResourcesFolder​(java.lang.String folderType)
        Description copied from interface: AppContext
        Return the path to the resources folder indicated on the configuration file, corresponding to the type sent as parameter.
        This is actually a convenience method for the getConfigParameter. This method returns all configuration parameters that starts with RESOURCE_FOLDER_PREFIX and folderType is whatever goes after that. This method also makes sure that the name of the folder has always a backslash "/" at the end.
        Specified by:
        getResourcesFolder in interface AppContext
        Parameters:
        folderType - integer constant that specifies the type of resource folder to return
        Returns:
        the path of the base folder for the folder type requested
      • getServletPath

        public java.lang.String getServletPath()
        Description copied from interface: BeanContext
        Get the full application path to the Servlet. This value is read form the configuration file and if is not set it will be automatically generated from the request.
        Specified by:
        getServletPath in interface BeanContext
        Returns:
        a String with the servlet path
      • isDoubleByte

        public boolean isDoubleByte()
        Description copied from interface: AppContext
        Returns true if the locale is a double byte language like Chinese, Korean or Japenese.
        Specified by:
        isDoubleByte in interface AppContext
        Returns:
        true if the locale is a double byte language like Chinese, Korean or Japenese.
      • putConfigParameter

        public void putConfigParameter​(java.lang.String key,
                                       java.lang.String value)
        Description copied from interface: AppContext
        Appends a Configuration Parameter to the Configuration Parameters list. Configuration parameters are defined in the web.xml file using the context-param and init-param tags.
        Specified by:
        putConfigParameter in interface AppContext
        Parameters:
        key - name of the configuration parameter
        value - value of the configuration parameter
      • setConfigServletPath

        public void setConfigServletPath​(java.lang.String configServletPath)
        Description copied from interface: AppContext
        Define the full application path to the Servlet as defined in the configuration file.
        Specified by:
        setConfigServletPath in interface AppContext
        Parameters:
        configServletPath - a String with the servlet path
      • setDefaultEvent

        public void setDefaultEvent​(int eventID)
        Description copied from interface: AppContext
        Sets the eventTD provided as the default event of the application
        Specified by:
        setDefaultEvent in interface AppContext
        Parameters:
        eventID - eventID of the application's default event
      • setPageManager

        public void setPageManager​(PageManager pageManager)
        Description copied from interface: AppContext
        This method sets the PageManager object associated with this application context.
        Specified by:
        setPageManager in interface AppContext
        Parameters:
        pageManager - A PageManager object.
      • setPreferences

        public void setPreferences​(Preferences prefs)
        Description copied from interface: AppContext
        This method sets a Preferences object for use with this application context.
        Specified by:
        setPreferences in interface AppContext
        Parameters:
        prefs - A Preferences object.
      • setRequestKeys

        public void setRequestKeys​(RequestKeys hrk)
        Description copied from interface: BeanContext
        This method sets the Request Keys object to be associated with this application context.
        Specified by:
        setRequestKeys in interface BeanContext
        Parameters:
        hrk - An instance of an RequestKeys object.
      • setServletPath

        public void setServletPath​(java.lang.String servletPath)
        Description copied from interface: AppContext
        Define the full application path to the Servlet. This value is read form the configuration file and if is not set it will be automatically generated from the request.
        Specified by:
        setServletPath in interface AppContext
        Parameters:
        servletPath - a String with the servlet path
      • setFeatures

        public void setFeatures​(WebFeatures features)
        Description copied from interface: BeanContext
        This method sets the Features object associated with this application context.
        Specified by:
        setFeatures in interface BeanContext
        Parameters:
        features - A WebFeatures object.
      • setMessages

        public void setMessages​(Messages msgs)
        Description copied from interface: BeanContext
        Sets a Messages instance to this BeanContext.
        Specified by:
        setMessages in interface BeanContext
        Parameters:
        msgs - the Messages instance to set.
      • getMaxResultSize

        public int getMaxResultSize()
      • setMaxResultSize

        public void setMaxResultSize​(int _maxResultSize)
      • maxResultSizeExceeded

        public boolean maxResultSizeExceeded()
      • setMaxResultSizeExceeded

        public void setMaxResultSizeExceeded​(boolean _maxResultSizeExceeded)
      • getRootName

        public java.lang.String getRootName()
        Description copied from interface: AppContext
        Returns the name of the root component In the case of the jsp/servlet enviroment,it will be the name of the main servlet component This corresponds to the value of the parameter AppContext.CONFIG_SERVLET_NAME
        Specified by:
        getRootName in interface AppContext
        Since:
        MicroStrategy Web 9.0.0
      • setAppSessionManager

        public void setAppSessionManager​(WebAppSessionManager sm)
        Description copied from interface: AppContext
        This method sets the Application Session Manager associated with this application context.
        Specified by:
        setAppSessionManager in interface AppContext
        Since:
        MicroStrategy Web 9.0.0
      • setEventHandlersCatalog

        public void setEventHandlersCatalog​(EventHandlersCatalog catalog)
        Description copied from interface: BeanContext
        Sets the EventHandlersCatalog instances associated with the current BeanContext. This catalog is then used by event-handlers to populate their events list and arguments. It includes for each event-handler, what are the events, and for each event, what are the argument and the name of the arguments used. This EventHandlersCatalog is typically configured through the "/WEB-INF/xml/config/events.xml" file.
        Specified by:
        setEventHandlersCatalog in interface BeanContext
        Parameters:
        catalog - an instance of EventHandlersCatalog to set.
        Since:
        MicroStrategy Web 9.0.0
      • getTransformException

        public java.lang.Exception getTransformException()
        Since:
        MicroStrategy Web 9.0.0
      • setTransformException

        public void setTransformException​(java.lang.Exception e)
        Since:
        MicroStrategy Web 9.0.0
      • getWebSessionManager

        public WebSessionManager getWebSessionManager()
        Description copied from interface: BeanContext
        This method returns the Application Session Manager associated with this application context. If not explicitly set through the #setAppSessionManager method, a new one is automatically created.
        Specified by:
        getWebSessionManager in interface BeanContext
        Returns:
        WebSessionManager