public class

MobileChunkedAppContext

extends Object
implements AppContext
java.lang.Object
   ↳ com.microstrategy.web.app.transforms.MobileChunkedAppContext

Summary

Nested Classes
class MobileChunkedAppContext.MobileElementIDMap  
class MobileChunkedAppContext.MobileObjectRefIDMap  
class MobileChunkedAppContext.MobilePageIndexMap  
class MobileChunkedAppContext.MobileStyleManager  
[Expand]
Inherited Constants
From interface com.microstrategy.web.app.beans.AppContext
Public Constructors
MobileChunkedAppContext(BeanContext bc)
Public Methods
void dispenseFile(String realPath, String resourcePath)
Dispenses the master copy of the a resource file located in the classpath into the file indicated in the realpath
WebAppSessionManager getAppSessionManager()
This method returns the Application Session Manager associated with this application context.
String getBrowserHeaderLocaleId(Locale defaultLocale)
This method will extract from request header a value corresponding to browser's locale info.
String getBrowserHeaderLocaleId()
This method will extract from request header a value corresponding to browser's locale info.
String getBrowserLocaleId()
This method returns the Locale Id defined in web preferences as Language.
String getBrowserServerLocaleId()
This method returns the Locale associated with Date and Number format locale web preference.If default, it'll return browser's locale Id instead.
BrowserSettings getBrowserSettings()
This method returns the BrowserSettings object associated with this application context.
String getConfigParameter(String param)
Returns the value of a configuration parameter.
String getConfigServletPath()
Get the full application path to the Servlet as defined in the configuration file
ContainerServices getContainerServices()
This method gets the Container Services object associated with this application context.
ContextMenuManager getContextMenuManager(String contextMenuName)
Returns an instance of a ContextMenuManager object.
PageComponent getCurrentPage()
Returns the name of the current page associated with the context.
Document getDocumentFromFileResource(String filePath)
This method returns a DOM Document from a file resource.
MobileChunkedAppContext.MobileElementIDMap getElementIDMap()
EventHandlersCatalog getEventHandlersCatalog()
Returns the current instance of EventHandlersCatalog associated with the current BeanContext.
ExternalSecurity getExternalSecurity()
This method returns the External Security instance associated with this application context.
WebFeatures getFeatures()
This method gets the Features object associated with this application context.
String getFileContentsAsString(String filePath, String encoding)
Returns the contents of the resource file as string from the file path provided using the named character encoding.
String getFileContentsAsString(String filePath)
Returns the contents of the resource file as string from the file path provided.
String getFontName()
Returns a string with the name of the fonts, or the list of fonts that a browser should use when rendering the page.
String getFontSize()
A string with the base font size to use, the string might contain the type of size (i.e, pt, px, etc.)
int getMaxResultSize()
Messages getMessages()
Returns the Messages instance from this BeanContext.
MessagesManager getMessagesManager()
Returns an instance of MessagesManager associated with the current BeanContext.
MobileChunkedAppContext.MobileStyleManager getMobileStyleManager()
MobileChunkedAppContext.MobileObjectRefIDMap getObjectMap()
PageManager getPageManager()
This method gets the PageManager object associated with this application context.
MobileChunkedAppContext.MobilePageIndexMap getPageMap()
Preferences getPreferences()
This method returns the Preferences object associated with this application context.
String getRealPath(String filePath)
Return the absolute path of th erelative path provided
RequestKeys getRequestKeys()
This method gets the Request Keys object associated with this application context.
String getResourceFileAsString(String filePath, String resourceFileName)
Returns the contents of the resource file as string from the file path provided.
String getResourcesFolder(String folderType)
Return the path to the resources folder indicated on the configuration file, corresponding to the type sent as parameter.
String getRootName()
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 CONFIG_SERVLET_NAME
String getServletPath()
Get the full application path to the Servlet.
SessionManager getSessionManager()
This method returns the Session Manager associated with this application context.
StyleCatalog getStyleCatalog()
Returns an instance of StyleCatalog associated with the current BeanContext.
Exception getTransformException()
WebSessionManager getWebSessionManager()
This method returns the Application Session Manager associated with this application context.
boolean isDoubleByte()
Returns true if the locale is a double byte language like Chinese, Korean or Japenese.
boolean maxResultSizeExceeded()
void putConfigParameter(String key, String value)
Appends a Configuration Parameter to the Configuration Parameters list.
void setAppSessionManager(WebAppSessionManager sm)
This method sets the Application Session Manager associated with this application context.
void setBrowserSettings(BrowserSettings bs)
This method sets the BrowserSettings object to be associated with this application context.
void setConfigServletPath(String configServletPath)
Define the full application path to the Servlet as defined in the configuration file.
void setContainerServices(ContainerServices cs)
This method sets the Container Services object associated with this application context.
void setCurrentPage(PageComponent page)
Set a page as the current page of this context.
void setDefaultEvent(int eventID)
Sets the eventTD provided as the default event of the application
void setEventHandlersCatalog(EventHandlersCatalog catalog)
Sets the EventHandlersCatalog instances associated with the current BeanContext.
void setExternalSecurity(ExternalSecurity es)
This method sets the External Security associated with this application context.
void setFeatures(WebFeatures features)
This method sets the Features object associated with this application context.
void setMaxResultSize(int _maxResultSize)
void setMaxResultSizeExceeded(boolean _maxResultSizeExceeded)
void setMessages(Messages msgs)
Sets a Messages instance to this BeanContext.
void setMessagesManager(MessagesManager msgsMgr)
Sets an instance of MessagesManager on the current BeanContext.
void setPageManager(PageManager pageManager)
This method sets the PageManager object associated with this application context.
void setPreferences(Preferences prefs)
This method sets a Preferences object for use with this application context.
void setRequestKeys(RequestKeys hrk)
This method sets the Request Keys object to be associated with this application context.
void setServletPath(String servletPath)
Define the full application path to the Servlet.
void setSessionManager(SessionManager sm)
This method sets the Session Manager associated with this application context.
void setStyleCatalog(StyleCatalog sc)
Sets an instance of StyleCatalog on the current BeanContext.
void setTransformException(Exception e)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.web.app.beans.AppContext
From interface com.microstrategy.web.beans.BeanContext

Public Constructors

public MobileChunkedAppContext (BeanContext bc)

Public Methods

public void dispenseFile (String realPath, String resourcePath)

Dispenses the master copy of the a resource file located in the classpath into the file indicated in the realpath

Parameters
realPath the destination of the resource file to dispense
resourcePath the resource file to dispense.

public WebAppSessionManager getAppSessionManager ()

This method returns the Application Session Manager associated with this application context. If not explicitly set through the setAppSessionManager(WebAppSessionManager) method, a new one is automatically created.
Note that this method fully replaces the getSessionManager method.

Returns

public String getBrowserHeaderLocaleId (Locale defaultLocale)

This method will extract from request header a value corresponding to browser's locale info. This info will be resolved in order to return current browser's LCID. This is equivalent to findBestSupportedLocale(Locale, Locale[]) with available display locales from getAvailableLocales(int) for TYPE_WEB_SUPPORTED.

Returns
  • a String with the LCID

public String getBrowserHeaderLocaleId ()

This method will extract from request header a value corresponding to browser's locale info. This info will be resolved in order to return current browser's LCID. This is equivalent to findBestSupportedLocale(Locale, Locale[]) with available display locales from getAvailableLocales(int) for TYPE_WEB_SUPPORTED. Defaults to LCID of 1033.

Returns
  • a String with the LCID

public String getBrowserLocaleId ()

This method returns the Locale Id defined in web preferences as Language. If default, it'll return browser's locale Id instead.

Returns
  • a String with the Locale ID.

public String getBrowserServerLocaleId ()

This method returns the Locale associated with Date and Number format locale web preference.If default, it'll return browser's locale Id instead.

Returns
  • a String with the Locale ID.

public BrowserSettings getBrowserSettings ()

This method returns the BrowserSettings object associated with this application context.

Returns

public String getConfigParameter (String param)

Returns the value of a configuration parameter. Configuration parameters are defined in the web.xml file using the context-param and init-param tags.

Parameters
param name of the parameter to retrieve
Returns
  • the value of the parameter

public String getConfigServletPath ()

Get the full application path to the Servlet as defined in the configuration file

Returns
  • a String with the servlet path

public ContainerServices getContainerServices ()

This method gets the Container Services object associated with this application context.

public ContextMenuManager getContextMenuManager (String contextMenuName)

Returns an instance of a ContextMenuManager object. Referenced ny name

Parameters
contextMenuName name of the ContextMenuManager object to retrieve
Returns

public PageComponent getCurrentPage ()

Returns the name of the current page associated with the context. It returns null if there no current page.

Returns

public Document getDocumentFromFileResource (String filePath)

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.

Parameters
filePath The absolute or relative path to the file resource.
Returns
  • the Document node that contains the file contents.

public MobileChunkedAppContext.MobileElementIDMap getElementIDMap ()

public EventHandlersCatalog getEventHandlersCatalog ()

Returns the current instance of EventHandlersCatalog associated with the current BeanContext.

Returns
  • an instance of EventHandlersCatalog.

public ExternalSecurity getExternalSecurity ()

This method returns the External Security instance associated with this application context.

public WebFeatures getFeatures ()

This method gets the Features object associated with this application context.

Returns

public String getFileContentsAsString (String filePath, String encoding)

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

Parameters
filePath location of the resource file (relative path)
encoding The name of a supported character encoding.
Returns
  • the contents of the resource file.

public String getFileContentsAsString (String filePath)

Returns the contents of the resource file as string from the file path provided. it does not dispense the file

Parameters
filePath location of the resource file (relative path)
Returns
  • the contents of the resource file.

public String getFontName ()

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

Returns
  • a String with a comma separated list of the fonts to use in this page.

public String getFontSize ()

A string with the base font size to use, the string might contain the type of size (i.e, pt, px, etc.)

Returns
  • a string with size of the font to use

public int getMaxResultSize ()

public Messages getMessages ()

Returns the Messages instance from this BeanContext.

Returns
  • the Messages instance.

public MessagesManager getMessagesManager ()

Returns an instance of MessagesManager associated with the current BeanContext.

Returns
  • an instance of MessagesManager.

public MobileChunkedAppContext.MobileStyleManager getMobileStyleManager ()

public PageManager getPageManager ()

This method gets the PageManager object associated with this application context.

Returns
  • the (@link PageManager) object associates with this application context.

public Preferences getPreferences ()

This method returns the Preferences object associated with this application context.

Returns

public String getRealPath (String filePath)

Return the absolute path of th erelative path provided

Parameters
filePath relative path to get the relative path from
Returns
  • the absolute path

public RequestKeys getRequestKeys ()

This method gets the Request Keys object associated with this application context.

Returns

public String getResourceFileAsString (String filePath, String resourceFileName)

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

Parameters
filePath location of the resource file (relative path)
resourceFileName resource file
Returns
  • the contents of the resource file.

public String getResourcesFolder (String folderType)

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.

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

public String getRootName ()

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 CONFIG_SERVLET_NAME

public String getServletPath ()

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.

Returns
  • a String with the servlet path

public SessionManager getSessionManager ()

This method returns the Session Manager associated with this application context.

Returns

public StyleCatalog getStyleCatalog ()

Returns an instance of StyleCatalog associated with the current BeanContext.

Returns
  • an instance of StyleCatalog.

public Exception getTransformException ()

public WebSessionManager getWebSessionManager ()

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.

public boolean isDoubleByte ()

Returns true if the locale is a double byte language like Chinese, Korean or Japenese.

Returns
  • true if the locale is a double byte language like Chinese, Korean or Japenese.

public boolean maxResultSizeExceeded ()

public void putConfigParameter (String key, String value)

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.

Parameters
key name of the configuration parameter
value value of the configuration parameter

public void setAppSessionManager (WebAppSessionManager sm)

This method sets the Application Session Manager associated with this application context.

public void setBrowserSettings (BrowserSettings bs)

This method sets the BrowserSettings object to be associated with this application context.

Parameters
bs An instance of an BrowserSettings object.

public void setConfigServletPath (String configServletPath)

Define the full application path to the Servlet as defined in the configuration file.

Parameters
configServletPath a String with the servlet path

public void setContainerServices (ContainerServices cs)

This method sets the Container Services object associated with this application context.

Parameters
cs A ContainerServices object.

public void setCurrentPage (PageComponent page)

Set a page as the current page of this context.

Parameters
page PageComponent instance.

public void setDefaultEvent (int eventID)

Sets the eventTD provided as the default event of the application

Parameters
eventID eventID of the application's default event

public void setEventHandlersCatalog (EventHandlersCatalog catalog)

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.

Parameters
catalog an instance of EventHandlersCatalog to set.

public void setExternalSecurity (ExternalSecurity es)

This method sets the External Security associated with this application context.

Parameters
es An ExternalSecurity instance.

public void setFeatures (WebFeatures features)

This method sets the Features object associated with this application context.

Parameters
features A WebFeatures object.

public void setMaxResultSize (int _maxResultSize)

public void setMaxResultSizeExceeded (boolean _maxResultSizeExceeded)

public void setMessages (Messages msgs)

Sets a Messages instance to this BeanContext.

Parameters
msgs the Messages instance to set.

public void setMessagesManager (MessagesManager msgsMgr)

Sets an instance of MessagesManager on the current BeanContext.

Parameters
msgsMgr an instance of MessagesManager to set.

public void setPageManager (PageManager pageManager)

This method sets the PageManager object associated with this application context.

Parameters
pageManager A PageManager object.

public void setPreferences (Preferences prefs)

This method sets a Preferences object for use with this application context.

Parameters
prefs A Preferences object.

public void setRequestKeys (RequestKeys hrk)

This method sets the Request Keys object to be associated with this application context.

Parameters
hrk An instance of an RequestKeys object.

public void setServletPath (String servletPath)

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.

Parameters
servletPath a String with the servlet path

public void setSessionManager (SessionManager sm)

This method sets the Session Manager associated with this application context.

Parameters
sm A SessionManager instance.

public void setStyleCatalog (StyleCatalog sc)

Sets an instance of StyleCatalog on the current BeanContext.

Parameters
sc an instance of StyleCatalog to set.

public void setTransformException (Exception e)