public final class CmsADESessionCache extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CmsADESessionCache.LastPageBean
Stores information about the container page which was last edited, so we can jump back to it later.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SESSION_ATTR_ADE_CACHE
Session attribute name constant.
|
Modifier | Constructor and Description |
---|---|
protected |
CmsADESessionCache(CmsObject cms,
javax.servlet.http.HttpServletRequest request)
Initializes the session cache.
|
Modifier and Type | Method and Description |
---|---|
void |
clearLastPage()
Removes the information about the last edited container page.
|
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.
|
CmsXmlContent |
getCacheXmlContent(CmsUUID structureId)
Returns the cached XML content document.
|
CmsUUID |
getElementView()
Returns the current element view id.
|
CmsADESessionCache.LastPageBean |
getLastPage()
Returns the lastPage.
|
CmsSitemapData.EditorMode |
getSitemapEditorMode()
Returns the sitemap editor mode.
|
CmsJspStandardContextBean.TemplateBean |
getTemplateBean(java.lang.String uri,
boolean safe)
Gets the cached template bean for a given container page uri.
|
boolean |
isEditSmallElements()
Returns true if, in this session, a newly opened container page editor window should display edit points for
small elements initially.
|
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 |
setCacheXmlContent(CmsUUID structureId,
CmsXmlContent xmlContent)
Caches the given XML content document.
|
void |
setEditSmallElements(boolean editSmallElements)
Sets the default initial setting for small element editability in this session.
|
void |
setElementView(CmsUUID elementView)
Sets the current element view id.
|
void |
setLastPage(CmsObject cms,
CmsUUID pageId,
CmsUUID detailId)
Stores information about the last edited container page.
|
void |
setSitemapEditorMode(CmsSitemapData.EditorMode sitemapEditorMode)
Sets the sitemap editor mode.
|
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.
|
void |
uncacheXmlContent(CmsUUID structureId)
Purges the XML content document by the given id from the cache.
|
public static final java.lang.String SESSION_ATTR_ADE_CACHE
protected CmsADESessionCache(CmsObject cms, javax.servlet.http.HttpServletRequest request)
cms
- the cms contextrequest
- the current requestpublic static CmsADESessionCache getCache(javax.servlet.http.HttpServletRequest request, CmsObject cms)
request
- the current requestcms
- the current CMS contextpublic void clearLastPage()
public CmsContainerElementBean getCacheContainerElement(java.lang.String key)
key
- the cache keynull
if not foundpublic CmsXmlContent getCacheXmlContent(CmsUUID structureId)
structureId
- the structure idpublic CmsUUID getElementView()
public CmsADESessionCache.LastPageBean getLastPage()
public CmsSitemapData.EditorMode getSitemapEditorMode()
public CmsJspStandardContextBean.TemplateBean getTemplateBean(java.lang.String uri, boolean safe)
uri
- the container page urisafe
- if true, return a valid template bean even if it hasn't been cached beforepublic boolean isEditSmallElements()
public boolean isToolbarVisible()
public void setCacheContainerElement(java.lang.String key, CmsContainerElementBean containerElement)
key
- the cache keycontainerElement
- the object to cachepublic void setCacheXmlContent(CmsUUID structureId, CmsXmlContent xmlContent)
structureId
- the structure idxmlContent
- the XML documentpublic void setEditSmallElements(boolean editSmallElements)
editSmallElements
- true if small elements should be initially editablepublic void setElementView(CmsUUID elementView)
elementView
- the current element view idpublic void setLastPage(CmsObject cms, CmsUUID pageId, CmsUUID detailId)
cms
- the CMS contextpageId
- the page iddetailId
- the detail content idpublic void setSitemapEditorMode(CmsSitemapData.EditorMode sitemapEditorMode)
sitemapEditorMode
- the sitemap editor modepublic void setTemplateBean(java.lang.String uri, CmsJspStandardContextBean.TemplateBean templateBean)
uri
- the container page uritemplateBean
- the template bean to cachepublic void setToolbarVisible(boolean toolbarVisible)
toolbarVisible
- the tool-bar visibility to setpublic void uncacheXmlContent(CmsUUID structureId)
structureId
- the structure id