Package com.microstrategy.web.app.beans
Class AppContextImpl
- java.lang.Object
-
- com.microstrategy.web.beans.BeanContextImpl
-
- com.microstrategy.web.app.beans.AppContextImpl
-
- All Implemented Interfaces:
AppContext
,BeanContext
public class AppContextImpl extends BeanContextImpl implements AppContext
This class implements the AppContext. The AppContext includes the objects that the microstrategy application expects to pass information between the different components. It saves an instance of specific applications objects, such as theSessionManager
, thePreferences
and theRequestKeys
.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.beans.BeanContextImpl
_containerServices, _newSessionMgr
-
Fields inherited from interface com.microstrategy.web.app.beans.AppContext
CONFIG_ADMIN_SERVERS, CONFIG_ADMIN_SERVLET_NAME, CONFIG_APP_BEANS_EVENTS, CONFIG_BLOCK_LIBRARY, CONFIG_CACHE_SETTINGS_FILE, CONFIG_CACHE_SETTINGS_PROP, CONFIG_CONFIG_FILES_DEFAULT_LOCATION, CONFIG_CONTROLLER_CLASS, CONFIG_DEBUG_FLAGS_MASK, CONFIG_DEFAULT_BLANK_ANALYSIS_ID, CONFIG_DEFAULT_BLANK_HTML5_DASHBOARD_ID, CONFIG_DEFAULT_BLANK_REPORT_ID, CONFIG_DEFAULT_BLANK_REPORT_WRITING_ID, CONFIG_DEFAULT_BLANK_XDA_REPORT_ID, CONFIG_DEFAULT_EVENT, CONFIG_DEFAULT_PDF_IMAGES_FOLDER, CONFIG_DISABLE_MAX_STATE_COMPRESSION, CONFIG_EXCEL_DIRECT_EXPORT, CONFIG_EXTERNAL_SECURITY_CLASS, CONFIG_FORMAT_PROPERTIES_MAPPING, CONFIG_FORMATTER_FILE, CONFIG_GLOBAL_FEATURES_CLASS, CONFIG_IFRAME_JSP, CONFIG_IFRAME_RESOURCE, CONFIG_IPAADMIN_FILE, CONFIG_IPAENV_FILE, CONFIG_ISERVER_POLLING_FREQUENCY, CONFIG_LOG_FILE_MB_SIZE_LIMIT, CONFIG_LOG_FILES_DEFAULT_LOCATION, CONFIG_LOG_PROPERTIES_FILE, CONFIG_MD_BEANS_EVENTS, CONFIG_MESSAGES, CONFIG_OBJBROWSER_FOLDERLINKS_FILE, CONFIG_PAGE_MANAGER, CONFIG_PAGE_MANAGER_RESOURCE, CONFIG_PREFERENCES, CONFIG_PREFERENCES_GROUPS, CONFIG_PREFERENCES_GROUPS_RESOURCE, CONFIG_REFINE_SSL_TRUSTSTORE, CONFIG_REFINE_SSL_TRUSTSTORE_PWD, CONFIG_RELOAD_CONFIG, CONFIG_SERVER_ADMIN_SERVLET_NAME, CONFIG_SERVER_TYPE, CONFIG_SERVLET_COMPONENT_NAME, CONFIG_SERVLET_EVENT_HANDLER_NAME, CONFIG_SERVLET_NAME, CONFIG_SERVLET_PATH, CONFIG_SSL_KEYSTORE, CONFIG_SSL_KEYSTORE_PWD, CONFIG_SSL_TRUSTSTORE, CONFIG_SSL_TRUSTSTORE_PWD, CONFIG_STYLE_CATALOG, CONFIG_STYLE_CATALOG_RESOURCE, CONFIG_SUBSCRIPTION_API_RESOURCE, CONFIG_SUBSCRIPTION_API_TEMPLATE_RESOURCE, CONFIG_SUBSCRIPTION_ENGINE_RESOURCE, CONFIG_SUBSCRIPTION_FOLDER, CONFIG_SUBSCRIPTION_PORTAL_RESOURCE, CONFIG_SYS_DEFINITONS_RESOURCE, CONFIG_SYS_PREFERENCE_DEFINITION, CONFIG_SYS_SERVER_DEFAULTS, CONFIG_SYS_SERVER_DEFAULTS_RESOURCE, CONFIG_WEB_SERVLET_NAME, CONFIG_WEBAPIERRORS_CLASSPATH, CONFIG_WEBAPIERRORS_FOLDER, CONFIG_WIDGET_LIBRARY, CONFIG_XHR_JSP, CUSTOM_HELP_RESOUCRCES_FOLDER, CUSTOM_RESOURCES_FOLDER, DEFAULT_EVENT_XML, DISPLAY_MODE_HTML, DISPLAY_MODE_JSON, HELP_RESOURCES_FOLDER, IMAGE_RESOURCES_FOLDER, JAVASCRIPT_RESOURCES_FOLDER, JSP_RESOURCES_FOLDER, RESOURCE_FOLDER_PREFIX, STYLE_DB_RESOURCES_FOLDER, STYLE_FIXED_FONT_DB_RESOURCES_FOLDER, STYLE_FIXED_FONT_RESOURCES_FOLDER, STYLE_RESOURCES_FOLDER
-
-
Constructor Summary
Constructors Constructor Description AppContextImpl()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
dispenseFile(java.lang.String realPath, java.lang.String resourcePath)
If the file does not exist, a duplicate is made from the specified resource.WebAppSessionManager
getAppSessionManager()
This method returns the Application Session Manager associated with this application context.java.lang.String
getBrowserHeaderLocaleId()
This method will extract from request header a value corresponding to browser's locale info.java.lang.String
getBrowserHeaderLocaleId(java.util.Locale defaultLocale)
This method will extract from request header a value corresponding to browser's locale info.java.lang.String
getBrowserLocaleId()
This method returns the Locale Id defined in web preferences as Language.java.lang.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 theBrowserSettings
instance associated with this application context.java.lang.String
getConfigParameter(java.lang.String param)
Returns the value of the configuration parameterjava.lang.String
getConfigServletPath()
Get the full application path to the Servlet as defined in the configuration fileContainerServices
getContainerServices()
This method gets the Container Services object associated with this application context.ContextMenuManager
getContextMenuManager(java.lang.String contextMenuName)
Returns an instance of aContextMenuManager
object.PageComponent
getCurrentPage()
Returns the name of the current page associated with the context.org.w3c.dom.Document
getDocumentFromFileResource(java.lang.String filePath)
This method returns a DOM Document from a file resource.protected java.lang.String
getEventHandlersCatalogPath()
Returns the path to use for the EventHandlersCatalog file.ExternalSecurity
getExternalSecurity()
This method returns the External Security instance associated with this application context.java.lang.String
getFileContentsAsString(java.lang.String filePath)
Returns the contents of the resource file as string from the file path provided.java.lang.String
getFileContentsAsString(java.lang.String filePath, java.lang.String encoding)
Returns the contents of the resource file as string from the file path provided using the named character encoding.java.lang.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.java.lang.String
getFontSize()
A string with the base font size to use, the string might contain the type of size (i.e, pt, px, etc.)Messages
getMessages()
Returns theMessages
instance from this BeanContext.protected java.lang.String
getMessagesManagerPath()
Returns the path to use for the MessagesManager (locales) file.PageManager
getPageManager()
This method gets the PageManager object associated with this application context.protected java.lang.String
getPageManagerPath()
Returns the path to use for the PageManager file.Preferences
getPreferences()
Returns thePreferences
object associated with this application context.java.lang.String
getRealPath(java.lang.String filePath)
Return the absolute path of the relative path providedjava.lang.String
getResourceFileAsString(java.lang.String filePath, java.lang.String resourceFileName)
Returns the contents of the resource file as string from the file path provided.java.lang.String
getResourcesFolder(java.lang.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.java.lang.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 parameterAppContext.CONFIG_SERVLET_NAME
java.lang.String
getServletPath()
Get the full application path to the Servlet.SessionManager
getSessionManager()
Deprecated.UseWebAppSessionManager
instead, via the getAppSessionManager method.protected java.lang.String
getStyleCatalogPath()
Returns the path to use for the StyleCatalog file.boolean
isDoubleByte()
Returns true if the locale is a double byte language like Chinese, Korean or Japenese.void
putConfigParameter(java.lang.String key, java.lang.String value)
Appends a configuration parameter to the collectionvoid
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(java.lang.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)
This method will first check if the config parameter for default event is not present.void
setExternalSecurity(ExternalSecurity es)
This method sets the External Security associated with this application context.void
setMessages(Messages userMsgs)
Sets aMessages
instance to this BeanContext.void
setPageManager(PageManager pageManager)
This method sets the PageManager object associated with this application context.void
setPreferences(Preferences preferences)
Sets thePreferences
object associated with this application context.void
setServletPath(java.lang.String servletPath)
Define the full application path to the Servlet.void
setSessionManager(SessionManager sessionManager)
Deprecated.UseWebAppSessionManager
instead, via the getAppSessionManager method.-
Methods inherited from class com.microstrategy.web.beans.BeanContextImpl
getEventHandlersCatalog, getFeatures, getMessagesManager, getRequestKeys, getStyleCatalog, getWebSessionManager, setEventHandlersCatalog, setFeatures, setMessagesManager, setRequestKeys, setStyleCatalog
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.beans.BeanContext
getEventHandlersCatalog, getFeatures, getMessagesManager, getRequestKeys, getStyleCatalog, getWebSessionManager, setEventHandlersCatalog, setFeatures, setMessagesManager, setRequestKeys, setStyleCatalog
-
-
-
-
Method Detail
-
getExternalSecurity
public ExternalSecurity getExternalSecurity()
This method returns the External Security instance associated with this application context.- Specified by:
getExternalSecurity
in interfaceAppContext
- Returns:
ExternalSecurity
-
setExternalSecurity
public void setExternalSecurity(ExternalSecurity es)
This method sets the External Security associated with this application context.- Specified by:
setExternalSecurity
in interfaceAppContext
- Parameters:
es
- AnExternalSecurity
instance.
-
getSessionManager
@Deprecated public SessionManager getSessionManager()
Deprecated.UseWebAppSessionManager
instead, via the getAppSessionManager method.Returns theSessionManager
object associated with this application context. The SessionManager manages the different sessions to the Intelligence Server.- Specified by:
getSessionManager
in interfaceAppContext
- Returns:
SessionManager
-
setSessionManager
@Deprecated public void setSessionManager(SessionManager sessionManager)
Deprecated.UseWebAppSessionManager
instead, via the getAppSessionManager method.Sets theSessionManager
object associated with this application context. The SessionManager manages the different sessions to the Intelligence Server.- Specified by:
setSessionManager
in interfaceAppContext
- Parameters:
sessionManager
- the session manager to associated with this AppContext
-
getPreferences
public Preferences getPreferences()
Returns thePreferences
object associated with this application context. The Preferences mantains the current settings of the application at different levels.- Specified by:
getPreferences
in interfaceAppContext
- Returns:
- the
Preferences
object associated with this application context.
-
getAppSessionManager
public WebAppSessionManager getAppSessionManager()
Description copied from interface:AppContext
This method returns the Application Session Manager associated with this application context. If not explicitly set through theAppContext.setAppSessionManager(com.microstrategy.web.app.WebAppSessionManager)
method, a new one is automatically created.
Note that this method fully replaces the getSessionManager method.- Specified by:
getAppSessionManager
in interfaceAppContext
- Returns:
- A
WebAppSessionManager
, representing the session manager associated with the AppContext object. - Since:
- MicroStrategy Web 8.0.1
-
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 interfaceAppContext
- Since:
- MicroStrategy Web 9.0.0
-
setPreferences
public void setPreferences(Preferences preferences)
Sets thePreferences
object associated with this application context. The Preferences mantains the current settings of the application at different levels.- Specified by:
setPreferences
in interfaceAppContext
- Parameters:
preferences
- thePreferences
object associated with this application context.
-
getPageManager
public PageManager getPageManager()
This method gets the PageManager object associated with this application context. If no PageManager has been explicitly associated, it will automatically used the one specified by the configuration parameters of the ContainerServices.- Specified by:
getPageManager
in interfaceAppContext
- Returns:
- the
PageManager
object associated with this application context.
-
getPageManagerPath
protected java.lang.String getPageManagerPath()
Returns the path to use for the PageManager file. This is only used if a PageManager has not been explicitly set through thesetPageManager(com.microstrategy.web.app.PageManager)
. This method will calculate the path based on the configuration parameters in the ContainerServices.- Since:
- MicroStrategy Web 9.0.0
-
setPageManager
public void setPageManager(PageManager pageManager)
This method sets the PageManager object associated with this application context.- Specified by:
setPageManager
in interfaceAppContext
- Parameters:
pageManager
- APageManager
object.
-
getStyleCatalogPath
protected java.lang.String getStyleCatalogPath()
Description copied from class:BeanContextImpl
Returns the path to use for the StyleCatalog file. This is only used if a StyleCatalog has not been explicitly set through theBeanContextImpl.setStyleCatalog(com.microstrategy.web.transform.StyleCatalog)
.- Overrides:
getStyleCatalogPath
in classBeanContextImpl
- Since:
- MicroStrategy Web 9.0.0
-
getEventHandlersCatalogPath
protected java.lang.String getEventHandlersCatalogPath()
Description copied from class:BeanContextImpl
Returns the path to use for the EventHandlersCatalog file. This is only used if a EventHandlersCatalog has not been explicitly set through theBeanContextImpl.setEventHandlersCatalog(com.microstrategy.web.beans.EventHandlersCatalog)
. By default it returns an empty string. Other bean context can override this method to provide a different location.- Overrides:
getEventHandlersCatalogPath
in classBeanContextImpl
- Since:
- MicroStrategy Web 9.0.0
-
getBrowserSettings
public BrowserSettings getBrowserSettings()
This method returns theBrowserSettings
instance associated with this application context.- Specified by:
getBrowserSettings
in interfaceAppContext
- Returns:
BrowserSettings
instance
-
setBrowserSettings
public void setBrowserSettings(BrowserSettings bs)
This method sets the BrowserSettings object to be associated with this application context.- Specified by:
setBrowserSettings
in interfaceAppContext
- Parameters:
bs
- An instance of anBrowserSettings
object.
-
setContainerServices
public void setContainerServices(ContainerServices cs)
This method sets the Container Services object associated with this application context.- Specified by:
setContainerServices
in interfaceBeanContext
- Overrides:
setContainerServices
in classBeanContextImpl
- Parameters:
cs
- AContainerServices
object.
-
getContainerServices
public ContainerServices getContainerServices()
This method gets the Container Services object associated with this application context.- Specified by:
getContainerServices
in interfaceBeanContext
- Overrides:
getContainerServices
in classBeanContextImpl
- Returns:
ContainerServices
-
getDocumentFromFileResource
public org.w3c.dom.Document getDocumentFromFileResource(java.lang.String filePath)
This method returns a DOM Document from a file resource. The method works by attempting the following operations, in order:- Try to call the same method on BeanContext first. If that succeeds, return.
- 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.
- 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.
- If we get to this step, then we return an Exception.
- Specified by:
getDocumentFromFileResource
in interfaceAppContext
- 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 interfaceAppContext
- 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 interfaceAppContext
- Parameters:
filePath
- location of the resource file (relative path)encoding
- The name of a supported character encoding.- Returns:
- the contents of the resource file.
-
getResourceFileAsString
public java.lang.String getResourceFileAsString(java.lang.String filePath, java.lang.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- Specified by:
getResourceFileAsString
in interfaceAppContext
- Parameters:
filePath
- location of the resource fileresourceFileName
- resource file- Returns:
- the contents of the resource file.
-
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 parameterAppContext.CONFIG_SERVLET_NAME
- Specified by:
getRootName
in interfaceAppContext
- Since:
- MicroStrategy Web 9.0.0
-
getRealPath
public java.lang.String getRealPath(java.lang.String filePath)
Return the absolute path of the relative path provided- Specified by:
getRealPath
in interfaceAppContext
- Parameters:
filePath
- relative path to get the relative path from- Returns:
- the absolute path
-
dispenseFile
public void dispenseFile(java.lang.String realPath, java.lang.String resourcePath) throws java.lang.IllegalArgumentException, MSTRUncheckedException
If the file does not exist, a duplicate is made from the specified resource. This method is used to generate user customizable files from resource templates. Its also a means of creating file system accessible files when the application is deployed as an unexpanded WAR (i.e. configuration files cannot be easily modified).- Specified by:
dispenseFile
in interfaceAppContext
- Parameters:
realPath
- Actual location of the file.resourcePath
- Location of the master copy resource.- Throws:
java.lang.IllegalArgumentException
- Thrown if either the file or resource path is empty.MSTRUncheckedException
- Thrown if the resource could not be located, or if an error occurs during duplication.
-
setServletPath
public void setServletPath(java.lang.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.- Specified by:
setServletPath
in interfaceAppContext
- Parameters:
servletPath
- aString
with the servlet path
-
getServletPath
public java.lang.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.- Specified by:
getServletPath
in interfaceBeanContext
- Overrides:
getServletPath
in classBeanContextImpl
- Returns:
- a
String
with the servlet path
-
setConfigServletPath
public void setConfigServletPath(java.lang.String configServletPath)
Define the full application path to the Servlet as defined in the configuration file.- Specified by:
setConfigServletPath
in interfaceAppContext
- Parameters:
configServletPath
- aString
with the servlet path
-
getConfigServletPath
public java.lang.String getConfigServletPath()
Get the full application path to the Servlet as defined in the configuration file- Specified by:
getConfigServletPath
in interfaceAppContext
- Returns:
- a
String
with the servlet path
-
getContextMenuManager
public ContextMenuManager getContextMenuManager(java.lang.String contextMenuName)
Returns an instance of aContextMenuManager
object. Referenced ny name- Specified by:
getContextMenuManager
in interfaceAppContext
- Parameters:
contextMenuName
- name of theContextMenuManager
object to retrieve- Returns:
- an instance of the
ContextMenuManager
object
-
getBrowserLocaleId
public java.lang.String getBrowserLocaleId()
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 interfaceAppContext
- Returns:
- a
String
with the Locale ID.
-
getBrowserServerLocaleId
public java.lang.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.- Specified by:
getBrowserServerLocaleId
in interfaceAppContext
- Returns:
- a
String
with the Locale ID.
-
getBrowserHeaderLocaleId
public java.lang.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 locale id.- Specified by:
getBrowserHeaderLocaleId
in interfaceAppContext
- Returns:
- a
String
with the Locale ID.
-
getBrowserHeaderLocaleId
public java.lang.String getBrowserHeaderLocaleId(java.util.Locale defaultLocale)
Description copied from interface:AppContext
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 toLocaleInfo.findBestSupportedLocale(Locale, Locale[])
with available display locales fromWebLocalizationManager.getAvailableLocales(int)
forEnumLocalizationType.TYPE_WEB_SUPPORTED
.- Specified by:
getBrowserHeaderLocaleId
in interfaceAppContext
- Returns:
- a
String
with the LCID
-
getMessages
public Messages getMessages()
Description copied from class:BeanContextImpl
Returns theMessages
instance from this BeanContext. This method does not contact theMessagesManager
object associated with thisBeanContext
.- Specified by:
getMessages
in interfaceBeanContext
- Overrides:
getMessages
in classBeanContextImpl
- Returns:
- the Messages instance.
- Since:
- MicroStrategy Web 9.0.0
-
setMessages
public void setMessages(Messages userMsgs)
Description copied from class:BeanContextImpl
Sets aMessages
instance to this BeanContext. This method does not contact theMessagesManager
object associated with thisBeanContext
.- Specified by:
setMessages
in interfaceBeanContext
- Overrides:
setMessages
in classBeanContextImpl
- Parameters:
userMsgs
- the Messages instance to set.- Since:
- MicroStrategy Web 9.0.0
-
getMessagesManagerPath
protected java.lang.String getMessagesManagerPath()
Description copied from class:BeanContextImpl
Returns the path to use for the MessagesManager (locales) file. This is only used if a MessagesManager has not been explicitly set through theBeanContextImpl.setMessagesManager(com.microstrategy.web.beans.MessagesManager)
.- Overrides:
getMessagesManagerPath
in classBeanContextImpl
- Since:
- MicroStrategy Web 9.0.0
-
getConfigParameter
public java.lang.String getConfigParameter(java.lang.String param)
Returns the value of the configuration parameter- Specified by:
getConfigParameter
in interfaceAppContext
- Parameters:
param
- name of the parameter to retrieve- Returns:
- the value of the parameter
-
putConfigParameter
public void putConfigParameter(java.lang.String key, java.lang.String value)
Appends a configuration parameter to the collection- Specified by:
putConfigParameter
in interfaceAppContext
- Parameters:
key
- name of the configuration parametervalue
- value of the configuration parameter
-
getResourcesFolder
public java.lang.String getResourcesFolder(java.lang.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 withRESOURCE_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 interfaceAppContext
- 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
-
setDefaultEvent
public void setDefaultEvent(int eventID)
This method will first check if the config parameter for default event is not present. If it is present then this method will not do anything. If the config paramter is not present, then this method will set the value of the config parameter with the @param eventID.- Specified by:
setDefaultEvent
in interfaceAppContext
- Parameters:
eventID
- identifier of the event to become default if not specified on the configuration parameters.
-
getFontSize
public java.lang.String getFontSize()
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 interfaceAppContext
- Returns:
- a string with size of the font to use
-
getFontName
public java.lang.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- Specified by:
getFontName
in interfaceAppContext
- Returns:
- a String with a comma separated list of the fonts to use in this page.
-
isDoubleByte
public boolean isDoubleByte()
Returns true if the locale is a double byte language like Chinese, Korean or Japenese.- Specified by:
isDoubleByte
in interfaceAppContext
- Returns:
- true if the locale is a double byte language like Chinese, Korean or Japenese.
-
getCurrentPage
public PageComponent getCurrentPage()
Description copied from interface:AppContext
Returns the name of the current page associated with the context. It returnsnull
if there no current page.- Specified by:
getCurrentPage
in interfaceAppContext
- Returns:
PageComponent
which is set on this object.- Since:
- MicroStrategy Web 9.0.0
- See Also:
AppContext.setCurrentPage(PageComponent)
-
setCurrentPage
public void setCurrentPage(PageComponent page)
Description copied from interface:AppContext
Set a page as the current page of this context.- Specified by:
setCurrentPage
in interfaceAppContext
- Parameters:
page
-PageComponent
instance.- Since:
- MicroStrategy Web 9.0.0
- See Also:
AppContext.getCurrentPage()
-
-