org.opencms.xml.containerpage
Class CmsADESessionCache

java.lang.Object
  extended by org.opencms.xml.containerpage.CmsADESessionCache

public final class CmsADESessionCache
extends java.lang.Object

ADE's session cache.

Since:
8.0.0

Field Summary
static java.lang.String SESSION_ATTR_ADE_CACHE
          Session attribute name constant.
 
Constructor Summary
CmsADESessionCache(CmsObject cms)
          Initializes the session cache.
 
Method Summary
static CmsADESessionCache getCache(javax.servlet.http.HttpServletRequest request, CmsObject cms)
          Gets the session cache for the current session.
 CmsContainerElementBean getCacheContainerElement(java.lang.String key)
          Returns the cached container element under the given key.
 java.util.List<CmsContainerElementBean> getRecentList()
          Returns the cached recent list.
 CmsJspStandardContextBean.TemplateBean getTemplateBean(java.lang.String uri, boolean safe)
          Gets the cached template bean for a given container page uri.
 boolean isShowEditorHelp()
          Returns the show editor help flag.
 boolean isToolbarVisible()
          Returns the tool-bar visibility.
 void setCacheContainerElement(java.lang.String key, CmsContainerElementBean containerElement)
          Caches the given container element under the given key.
 void setCacheRecentList(java.util.List<CmsContainerElementBean> list)
          Caches the given recent list.
 void setShowEditorHelp(boolean isShowEditorHelp)
          Sets the show editor help flag.
 void setTemplateBean(java.lang.String uri, CmsJspStandardContextBean.TemplateBean templateBean)
          Caches a template bean for a given container page URI.
 void setToolbarVisible(boolean toolbarVisible)
          Sets the tool-bar visibility flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_ATTR_ADE_CACHE

public static final java.lang.String SESSION_ATTR_ADE_CACHE
Session attribute name constant.

See Also:
Constant Field Values
Constructor Detail

CmsADESessionCache

public CmsADESessionCache(CmsObject cms)
Initializes the session cache.

Parameters:
cms - the cms context
Method Detail

getCache

public static CmsADESessionCache getCache(javax.servlet.http.HttpServletRequest request,
                                          CmsObject cms)
Gets the session cache for the current session.

Parameters:
request - the current request
cms - the current CMS context
Returns:
the ADE session cache for the current session

getCacheContainerElement

public CmsContainerElementBean getCacheContainerElement(java.lang.String key)
Returns the cached container element under the given key.

Parameters:
key - the cache key
Returns:
the cached container element or null if not found

getRecentList

public java.util.List<CmsContainerElementBean> getRecentList()
Returns the cached recent list.

Returns:
the cached recent list

getTemplateBean

public CmsJspStandardContextBean.TemplateBean getTemplateBean(java.lang.String uri,
                                                              boolean safe)
Gets the cached template bean for a given container page uri.

Parameters:
uri - the container page uri
safe - if true, return a valid template bean even if it hasn't been cached before
Returns:
the template bean

isShowEditorHelp

public boolean isShowEditorHelp()
Returns the show editor help flag.

Returns:
the show editor help flag

isToolbarVisible

public boolean isToolbarVisible()
Returns the tool-bar visibility.

Returns:
the tool-bar visibility

setCacheContainerElement

public void setCacheContainerElement(java.lang.String key,
                                     CmsContainerElementBean containerElement)
Caches the given container element under the given key.

Parameters:
key - the cache key
containerElement - the object to cache

setCacheRecentList

public void setCacheRecentList(java.util.List<CmsContainerElementBean> list)
Caches the given recent list.

Parameters:
list - the recent list to cache

setShowEditorHelp

public void setShowEditorHelp(boolean isShowEditorHelp)
Sets the show editor help flag.

Parameters:
isShowEditorHelp - the show editor help flag to set

setTemplateBean

public void setTemplateBean(java.lang.String uri,
                            CmsJspStandardContextBean.TemplateBean templateBean)
Caches a template bean for a given container page URI.

Parameters:
uri - the container page uri
templateBean - the template bean to cache

setToolbarVisible

public void setToolbarVisible(boolean toolbarVisible)
Sets the tool-bar visibility flag.

Parameters:
toolbarVisible - the tool-bar visibility to set