Package com.aquima.web.ui.mvc
Class TemplateContext
- java.lang.Object
-
- com.aquima.web.ui.mvc.TemplateContext
-
- All Implemented Interfaces:
ITemplateContext
public class TemplateContext extends Object implements ITemplateContext
-
-
Constructor Summary
Constructors Constructor Description TemplateContext(String sessionId, String theme, String webResourceBasePath, String apiBasePath, PageContent currentPage, boolean developmentMode, int sessionTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getApiBasePath()
This method returns the base path for the web apiPageContent
getCurrentPage()
This method returns the current page of the session.String
getCurrentPageJson()
This method returns the current page serialized in json format.String
getSessionId()
This method returns the current sessionId.int
getSessionTimeout()
This method returns the session timeout in seconds.String
getTheme()
This method returns the current theme name.String
getWebResourceBasePath()
This method returns the base path for web resources.boolean
isDevelopmentMode()
This method returns an indicator for development mode.
-
-
-
Constructor Detail
-
TemplateContext
public TemplateContext(String sessionId, String theme, String webResourceBasePath, String apiBasePath, PageContent currentPage, boolean developmentMode, int sessionTimeout)
-
-
Method Detail
-
getTheme
public String 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
public String 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
public String 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
public String getSessionId()
Description copied from interface:ITemplateContext
This method returns the current sessionId.- Specified by:
getSessionId
in interfaceITemplateContext
- Returns:
- The sessionId.
-
getCurrentPage
public PageContent 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
public String 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.
-
-