Package com.aquima.web.ui.mvc
Class TemplateContext
java.lang.Object
com.aquima.web.ui.mvc.TemplateContext
- All Implemented Interfaces:
ITemplateContext
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateContext
(String sessionId, String theme, String webResourceBasePath, String apiBasePath, PageContent currentPage, boolean developmentMode, int sessionTimeout) -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the base path for the web apiThis method returns the current page of the session.This method returns the current page serialized in json format.This method returns the current sessionId.int
This method returns the session timeout in seconds.getTheme()
This method returns the current theme name.This method returns the base path for web resources.boolean
This method returns an indicator for development mode.
-
Constructor Details
-
TemplateContext
public TemplateContext(String sessionId, String theme, String webResourceBasePath, String apiBasePath, PageContent currentPage, boolean developmentMode, int sessionTimeout)
-
-
Method Details
-
getTheme
Description copied from interface:ITemplateContext
This method returns the current theme name.- Specified by:
getTheme
in interfaceITemplateContext
- Returns:
- The current theme name, never null.
-
getApiBasePath
Description copied from interface:ITemplateContext
This method returns the base path for the web api- Specified by:
getApiBasePath
in interfaceITemplateContext
- Returns:
- The base path, never null.
-
getWebResourceBasePath
Description copied from interface:ITemplateContext
This method returns the base path for web resources.- Specified by:
getWebResourceBasePath
in interfaceITemplateContext
- Returns:
- The base path, never null.
-
getSessionId
Description copied from interface:ITemplateContext
This method returns the current sessionId.- Specified by:
getSessionId
in interfaceITemplateContext
- Returns:
- The sessionId.
-
getCurrentPage
Description copied from interface:ITemplateContext
This method returns the current page of the session.- Specified by:
getCurrentPage
in interfaceITemplateContext
- Returns:
- The current page.
-
getCurrentPageJson
Description copied from interface:ITemplateContext
This method returns the current page serialized in json format.- Specified by:
getCurrentPageJson
in interfaceITemplateContext
- Returns:
- The current page.
-
isDevelopmentMode
public boolean isDevelopmentMode()Description copied from interface:ITemplateContext
This method returns an indicator for development mode.- Specified by:
isDevelopmentMode
in interfaceITemplateContext
- Returns:
- Development mode indicator.
-
getSessionTimeout
public int getSessionTimeout()Description copied from interface:ITemplateContext
This method returns the session timeout in seconds.- Specified by:
getSessionTimeout
in interfaceITemplateContext
- Returns:
- The session timeout, negative for unlimited.
-