Class CmsJspStandardContextBean
- java.lang.Object
-
- org.opencms.jsp.util.CmsJspStandardContextBean
-
public final class CmsJspStandardContextBean extends java.lang.Object
Allows convenient access to the most important OpenCms functions on a JSP page, indented to be used from a JSP with the JSTL or EL.This bean is available by default in the context of an OpenCms managed JSP.
- Since:
- 8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CmsJspStandardContextBean.CmsContainerElementWrapper
Container element wrapper to add some API methods.class
CmsJspStandardContextBean.CmsDetailLookupTransformer
Provides a lazy initialized Map that provides the detail page link as a value when given the name of a (named) dynamic function or resource type as a key.class
CmsJspStandardContextBean.SettingsTransformer
The element setting transformer.static class
CmsJspStandardContextBean.TemplateBean
Bean containing a template name and URI.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIBUTE_CMS_OBJECT
The attribute name of the cms object.static java.lang.String
ATTRIBUTE_NAME
The attribute name of the standard JSP context bean.protected static org.apache.commons.logging.Log
LOG
The logger instance for this class.protected CmsObject
m_cms
OpenCms user context.protected CmsADEConfigData
m_config
The sitemap configuration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CmsJspStandardContextBean
createCopy()
Returns a copy of this JSP context bean.java.lang.String
decrypt(java.lang.String text)
Uses the default text encryption method to decrypt an encrypted string.java.lang.String
elementCachingHash()
Returns a caching hash specific to the element, it's properties and the current container width.java.lang.String
encrypt(java.lang.String text)
Uses the default text encryption to encrypt an input text.java.util.List<java.util.Locale>
getAvailableLocales()
Returns the locales available for the currently requested URI.java.lang.Object
getBean(java.lang.String className)
Helper for easy instantiation and initialization of custom context beans that returns an instance of the class specified viaclassName
, with the current context already set.java.lang.String
getBinaryUploadFolder(CmsJspContentAccessBean content)
Finds the folder to use for binary uploads, based on the list configuration given as an argument or the current sitemap configuration.protected CmsObject
getCmsObject()
Accessor for the CmsObject.CmsContainerBean
getContainer()
Returns the container the currently rendered element is part of.CmsObject
getControllerCms()
Gets the CmsObject from the current Flex controller.CmsJspResourceWrapper
getDetailContent()
Returns the current detail content, ornull
if no detail content is requested.CmsUUID
getDetailContentId()
Returns the structure id of the current detail content, ornull
if no detail content is requested.java.lang.String
getDetailContentSitePath()
Returns the detail content site path, ornull
if not available.CmsJspResourceWrapper
getDetailFunctionPage()
Returns the detail function page.CmsContainerPageBean
getDetailOnlyPage()
Returns the detail only page.CmsJspStandardContextBean.CmsContainerElementWrapper
getElement()
Returns the currently rendered element.java.util.Map<java.lang.String,java.util.List<CmsJspStandardContextBean.CmsContainerElementWrapper>>
getElementBeansInContainers()
Returns a lazy initialized map of wrapped container elements beans by container name suffix.protected I_CmsFormatterBean
getElementFormatter(CmsContainerElementBean element)
Returns the formatter configuration to the given element.java.util.Map<java.lang.String,java.util.List<CmsJspResourceWrapper>>
getElementsInContainer()
Returns a lazy initialized map of wrapped element resources by container name.java.util.Map<java.lang.String,java.util.List<CmsJspResourceWrapper>>
getElementsInContainers()
Returns a lazy initialized map of wrapped element resources by container name suffix.java.lang.String
getEnableReload()
Alternative method name for getReloadMarker().java.util.Map<java.lang.String,CmsDynamicFunctionBeanWrapper>
getFunction()
Returns a lazy initialized Map which allows access to the dynamic function beans using the JSP EL.java.util.Map<java.lang.String,java.lang.String>
getFunctionDetail()
Deprecated.usegetFunctionDetailPage()
insteadstatic java.lang.String
getFunctionDetailLink(CmsObject cms, java.lang.String prefix, java.lang.String functionName, boolean fullLink)
Gets the link to a function detail page.static java.lang.String
getFunctionDetailLinkExact(CmsObject cms, java.lang.String functionName)
Gets the link to a function detail page.java.util.Map<java.lang.String,java.lang.String>
getFunctionDetailPage()
Returns a lazy initialized Map that provides the detail page link as a value when given the name of a (named) dynamic function as a key.java.util.Map<java.lang.String,java.lang.String>
getFunctionDetailPageExact()
Returns a lazy initialized Map that provides the detail page link as a value when given the name of a (named) dynamic function as a key.java.util.Map<CmsJspContentAccessBean,CmsDynamicFunctionFormatWrapper>
getFunctionFormatFromContent()
Returns a lazy map which creates a wrapper object for a dynamic function format when given an XML content as a key.static CmsJspStandardContextBean
getInstance(javax.servlet.ServletRequest req)
Creates a new instance of the standard JSP context bean.boolean
getIsDetailPage()
Checks if the current page is a detail page.boolean
getIsEditMode()
Checks if the current request should be direct edit enabled.boolean
getIsJSONRequest()
Returns true if the current request is a JSON request.boolean
getIsOnlineProject()
Returns if the current project is the online project.java.util.Locale
getLocale()
Returns the current locale.java.util.Map<java.lang.String,CmsJspResourceWrapper>
getLocaleResource()
Gets a map providing access to the locale variants of the current page.protected java.lang.String
getLocaleSpecificTitle(java.util.Locale locale)
Returns the title according to the given locale.java.util.Locale
getMainLocale()
Gets the main locale for the current page's locale group.java.util.Map<java.lang.String,java.lang.String>
getMeta()
Returns the meta mappings map.CmsContainerPageBean
getPage()
Returns the currently displayed container page.CmsContainerPageBean
getPage(java.lang.Object page, java.lang.Object locale)
Returns the container page bean for the give page and locale.CmsJspResourceWrapper
getPageResource()
Returns the current container page resource.CmsContainerBean
getParentContainer()
Returns the parent container to the current container if available.java.util.Map<java.lang.String,CmsContainerBean>
getParentContainers()
Returns the instance id parent container mapping.CmsContainerElementBean
getParentElement()
Returns the parent element to the current element if available.protected CmsContainerElementBean
getParentElement(CmsContainerElementBean element)
Returns the parent element if available.java.util.Set<java.lang.String>
getPluginGroups()
Gets the set of plugin group names.java.util.Map<java.lang.String,java.util.List<CmsTemplatePluginWrapper>>
getPlugins()
Gets the map of plugins by group.java.util.Map<java.lang.String,java.lang.String>
getPreviewFormatter()
JSP EL accessor method for retrieving the preview formatters.java.util.Map<java.lang.String,CmsJspCategoryAccessBean>
getReadAllSubCategories()
Reads all sub-categories below the provided category.java.util.Map<java.lang.String,java.util.Map<java.lang.String,CmsJspObjectValueWrapper>>
getReadAttributeOrProperty()
Lazily reads the given attribute from the current sitemap or a property of the same name from the given resource.CmsJspCategoryAccessBean
getReadCategories()
Reads the categories assigned to the currently requested URI.java.util.Map<java.lang.String,CmsCategory>
getReadCategory()
Transforms the category path of a category to the category.java.util.Map<java.lang.String,java.util.List<CmsCategory>>
getReadPathCategories()
Transforms the category path to the list of all categories on that path.java.util.Map<java.lang.String,CmsJspCategoryAccessBean>
getReadResourceCategories()
Reads the categories assigned to a resource.java.lang.String
getReloadMarker()
Returns a HTML comment string that will cause the container page editor to reload the page if the element or its settings were edited.javax.servlet.ServletRequest
getRequest()
Gets the stored request.CmsRequestContext
getRequestContext()
Returns the request context.CmsSite
getSite()
Returns the current site.CmsJspSitemapConfigWrapper
getSitemapConfig()
Gets the wrapper for the sitemap configuration.protected CmsADEConfigData
getSitemapConfigInternal()
Accessor for the sitemap configuration.java.util.Map<java.lang.String,java.lang.String>
getSitePath()
Transforms root paths to site paths.java.lang.String
getSubSitePath()
Returns the subsite path for the currently requested URI.CmsSystemInfo
getSystemInfo()
Returns the system information.CmsJspStandardContextBean.TemplateBean
getTemplate()
Gets a bean containing information about the current template.java.lang.String
getTitle()
Returns the title of a page delivered from OpenCms, usually used for the<title>
tag of a HTML page.java.util.Map<java.lang.String,java.lang.String>
getTitleLocale()
Get the title and read the Title property according the provided locale.java.util.Map<java.lang.String,java.lang.String>
getTypeDetailPage()
Returns a lazy initialized Map that provides the detail page link as a value when given the name of a resource type as a key.CmsJspVfsAccessBean
getVfs()
Returns an initialized VFS access bean.java.util.Locale
getWorkplaceLocale()
Returns the workplace locale from the current user's settings.java.util.Map<java.lang.Object,java.lang.Object>
getWrap()
Returns an EL access wrapper map for the given object.void
initPage()
Initializes the requested container page.boolean
isDetailPageAvailable()
Returnstrue
boolean
isDetailRequest()
Returnstrue
if this is a request to a detail resource,false
otherwise.boolean
isDragMode()
Returns if the page is in drag mode.boolean
isEdited()
Returns the flag to indicate if in drag and drop mode.boolean
isModelGroupElement()
Returns if the current element is a model group.boolean
isModelGroupPage()
Returns if the current page is used to manage model groups.protected CmsDynamicFunctionBean
readDynamicFunctionBean(java.lang.String configuredName)
Reads a dynamic function bean, given its name in the module configuration.void
setContainer(CmsContainerBean container)
Sets the container the currently rendered element is part of.void
setDetailOnlyPage(CmsContainerPageBean detailOnlyPage)
Sets the detail only page.void
setDragMode(boolean isDragMode)
Sets if the page is in drag mode.void
setEdited(boolean edited)
Sets the flag to indicate if in drag and drop mode.void
setElement(CmsContainerElementBean element)
Sets the currently rendered element.void
setPage(CmsContainerPageBean page)
Sets the currently displayed container page.void
updateCmsObject(CmsObject cms)
Updates the internally stored OpenCms user context.void
updateRequestData(CmsFlexRequest cmsFlexRequest)
Updates the standard context bean from the request.
-
-
-
Field Detail
-
ATTRIBUTE_CMS_OBJECT
public static final java.lang.String ATTRIBUTE_CMS_OBJECT
The attribute name of the cms object.- See Also:
- Constant Field Values
-
ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_NAME
The attribute name of the standard JSP context bean.- See Also:
- Constant Field Values
-
LOG
protected static final org.apache.commons.logging.Log LOG
The logger instance for this class.
-
m_config
protected CmsADEConfigData m_config
The sitemap configuration.
-
-
Method Detail
-
getFunctionDetailLink
public static java.lang.String getFunctionDetailLink(CmsObject cms, java.lang.String prefix, java.lang.String functionName, boolean fullLink)
Gets the link to a function detail page.- Parameters:
cms
- the CMS contextprefix
- the function detail prefixfunctionName
- the function namefullLink
- true if links should be generated with server prefix- Returns:
- the link
-
getFunctionDetailLinkExact
public static java.lang.String getFunctionDetailLinkExact(CmsObject cms, java.lang.String functionName)
Gets the link to a function detail page.This just returns null if no function detail page is defined, it does not use the default detail page as a fallback.
- Parameters:
cms
- the CMS contextfunctionName
- the function name- Returns:
- the link
-
getInstance
public static CmsJspStandardContextBean getInstance(javax.servlet.ServletRequest req)
Creates a new instance of the standard JSP context bean.To prevent multiple creations of the bean during a request, the OpenCms request context attributes are used to cache the created VFS access utility bean.
- Parameters:
req
- the current servlet request- Returns:
- a new instance of the standard JSP context bean
-
createCopy
public CmsJspStandardContextBean createCopy()
Returns a copy of this JSP context bean.- Returns:
- a copy of this JSP context bean
-
decrypt
public java.lang.String decrypt(java.lang.String text)
Uses the default text encryption method to decrypt an encrypted string.- Parameters:
text
- the encrypted stirng- Returns:
- the decrypted string
-
elementCachingHash
public java.lang.String elementCachingHash()
Returns a caching hash specific to the element, it's properties and the current container width.- Returns:
- the caching hash
-
encrypt
public java.lang.String encrypt(java.lang.String text)
Uses the default text encryption to encrypt an input text.- Parameters:
text
- the input text- Returns:
- the encrypted text
-
getAvailableLocales
public java.util.List<java.util.Locale> getAvailableLocales()
Returns the locales available for the currently requested URI.- Returns:
- the locales available for the currently requested URI.
-
getBean
public java.lang.Object getBean(java.lang.String className)
Helper for easy instantiation and initialization of custom context beans that returns an instance of the class specified viaclassName
, with the current context already set.- Parameters:
className
- name of the class to instantiate. Must be a subclass ofA_CmsJspCustomContextBean
.- Returns:
- an instance of the provided class with the current context already set.
-
getBinaryUploadFolder
public java.lang.String getBinaryUploadFolder(CmsJspContentAccessBean content)
Finds the folder to use for binary uploads, based on the list configuration given as an argument or the current sitemap configuration.- Parameters:
content
- the list configuration content- Returns:
- the binary upload folder
-
getContainer
public CmsContainerBean getContainer()
Returns the container the currently rendered element is part of.- Returns:
- the currently the currently rendered element is part of
-
getControllerCms
public CmsObject getControllerCms()
Gets the CmsObject from the current Flex controller.- Returns:
- the CmsObject from the current Flex controller
-
getDetailContent
public CmsJspResourceWrapper getDetailContent()
Returns the current detail content, ornull
if no detail content is requested.- Returns:
- the current detail content, or
null
if no detail content is requested.
-
getDetailContentId
public CmsUUID getDetailContentId()
Returns the structure id of the current detail content, ornull
if no detail content is requested.- Returns:
- the structure id of the current detail content, or
null
if no detail content is requested.
-
getDetailContentSitePath
public java.lang.String getDetailContentSitePath()
Returns the detail content site path, ornull
if not available.- Returns:
- the detail content site path
-
getDetailFunctionPage
public CmsJspResourceWrapper getDetailFunctionPage()
Returns the detail function page.- Returns:
- the detail function page
-
getDetailOnlyPage
public CmsContainerPageBean getDetailOnlyPage()
Returns the detail only page.- Returns:
- the detail only page
-
getElement
public CmsJspStandardContextBean.CmsContainerElementWrapper getElement()
Returns the currently rendered element.- Returns:
- the currently rendered element
-
getElementBeansInContainers
public java.util.Map<java.lang.String,java.util.List<CmsJspStandardContextBean.CmsContainerElementWrapper>> getElementBeansInContainers()
Returns a lazy initialized map of wrapped container elements beans by container name suffix.So in case there is more than one container where the name end with the given suffix, a joined list of container elements beans is returned.
- Returns:
- a lazy initialized map of wrapped container elements beans by container name suffix
- See Also:
getElementsInContainer()
-
getElementsInContainer
public java.util.Map<java.lang.String,java.util.List<CmsJspResourceWrapper>> getElementsInContainer()
Returns a lazy initialized map of wrapped element resources by container name.- Returns:
- the lazy map of element resource wrappers
-
getElementsInContainers
public java.util.Map<java.lang.String,java.util.List<CmsJspResourceWrapper>> getElementsInContainers()
Returns a lazy initialized map of wrapped element resources by container name suffix.So in case there is more than one container where the name end with the given suffix, a joined list of elements is returned.
- Returns:
- the lazy map of element resource wrappers
- See Also:
getElementBeansInContainers()
-
getEnableReload
public java.lang.String getEnableReload()
Alternative method name for getReloadMarker().- Returns:
- the reload marker
- See Also:
getReloadMarker()
-
getFunction
public java.util.Map<java.lang.String,CmsDynamicFunctionBeanWrapper> getFunction()
Returns a lazy initialized Map which allows access to the dynamic function beans using the JSP EL.When given a key, the returned map will look up the corresponding dynamic function bean in the module configuration.
- Returns:
- a lazy initialized Map which allows access to the dynamic function beans using the JSP EL
-
getFunctionDetail
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getFunctionDetail()
Deprecated.usegetFunctionDetailPage()
insteadDeprecated method to access function detail pages using the EL.- Returns:
- a lazy initialized Map that provides the detail page link as a value when given the name of a (named) dynamic function as a key
-
getFunctionDetailPage
public java.util.Map<java.lang.String,java.lang.String> getFunctionDetailPage()
Returns a lazy initialized Map that provides the detail page link as a value when given the name of a (named) dynamic function as a key.The provided Map key is assumed to be a String that represents a named dynamic function.
Usage example on a JSP with the JSTL:
<a href=${cms.functionDetailPage['search']} />
- Returns:
- a lazy initialized Map that provides the detail page link as a value when given the name of a (named) dynamic function as a key
- See Also:
getTypeDetailPage()
-
getFunctionDetailPageExact
public java.util.Map<java.lang.String,java.lang.String> getFunctionDetailPageExact()
Returns a lazy initialized Map that provides the detail page link as a value when given the name of a (named) dynamic function as a key.The provided Map key is assumed to be a String that represents a named dynamic function.
Usage example on a JSP with the JSTL:
<a href=${cms.functionDetailPage['search']} />
- Returns:
- a lazy initialized Map that provides the detail page link as a value when given the name of a (named) dynamic function as a key
- See Also:
getTypeDetailPage()
-
getFunctionFormatFromContent
public java.util.Map<CmsJspContentAccessBean,CmsDynamicFunctionFormatWrapper> getFunctionFormatFromContent()
Returns a lazy map which creates a wrapper object for a dynamic function format when given an XML content as a key.- Returns:
- a lazy map for accessing function formats for a content
-
getIsDetailPage
public boolean getIsDetailPage()
Checks if the current page is a detail page.- Returns:
- true if the current page is a detail page
-
getIsEditMode
public boolean getIsEditMode()
Checks if the current request should be direct edit enabled. Online-, history-requests, previews and temporary files will not be editable.- Returns:
true
if the current request should be direct edit enabled
-
getIsJSONRequest
public boolean getIsJSONRequest()
Returns true if the current request is a JSON request.- Returns:
- true if we are in a JSON request
-
getIsOnlineProject
public boolean getIsOnlineProject()
Returns if the current project is the online project.- Returns:
true
if the current project is the online project
-
getLocale
public java.util.Locale getLocale()
Returns the current locale.- Returns:
- the current locale
-
getLocaleResource
public java.util.Map<java.lang.String,CmsJspResourceWrapper> getLocaleResource()
Gets a map providing access to the locale variants of the current page.Note that all available locales for the site / subsite are used as keys, not just the ones for which a locale variant actually exists. Usage in JSPs: ${cms.localeResource['de']]
- Returns:
- the map from locale strings to locale variant resources
-
getMainLocale
public java.util.Locale getMainLocale()
Gets the main locale for the current page's locale group.- Returns:
- the main locale for the current page's locale group
-
getMeta
public java.util.Map<java.lang.String,java.lang.String> getMeta()
Returns the meta mappings map.- Returns:
- the meta mappings
-
getPage
public CmsContainerPageBean getPage()
Returns the currently displayed container page.- Returns:
- the currently displayed container page
-
getPage
public CmsContainerPageBean getPage(java.lang.Object page, java.lang.Object locale)
Returns the container page bean for the give page and locale.- Parameters:
page
- the container page resource as id, path or already as resourcelocale
- the content locale as locale or string- Returns:
- the container page bean
-
getPageResource
public CmsJspResourceWrapper getPageResource()
Returns the current container page resource.- Returns:
- the current container page resource
-
getParentContainer
public CmsContainerBean getParentContainer()
Returns the parent container to the current container if available.- Returns:
- the parent container
-
getParentContainers
public java.util.Map<java.lang.String,CmsContainerBean> getParentContainers()
Returns the instance id parent container mapping.- Returns:
- the instance id parent container mapping
-
getParentElement
public CmsContainerElementBean getParentElement()
Returns the parent element to the current element if available.- Returns:
- the parent element or null
-
getPluginGroups
public java.util.Set<java.lang.String> getPluginGroups()
Gets the set of plugin group names.- Returns:
- the set of plugin group names
-
getPlugins
public java.util.Map<java.lang.String,java.util.List<CmsTemplatePluginWrapper>> getPlugins()
Gets the map of plugins by group.- Returns:
- the map of active plugins by group
-
getPreviewFormatter
public java.util.Map<java.lang.String,java.lang.String> getPreviewFormatter()
JSP EL accessor method for retrieving the preview formatters.- Returns:
- a lazy map for accessing preview formatters
-
getReadAllSubCategories
public java.util.Map<java.lang.String,CmsJspCategoryAccessBean> getReadAllSubCategories()
Reads all sub-categories below the provided category.- Returns:
- The map from the provided category to it's sub-categories in a
CmsJspCategoryAccessBean
.
-
getReadAttributeOrProperty
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,CmsJspObjectValueWrapper>> getReadAttributeOrProperty()
Lazily reads the given attribute from the current sitemap or a property of the same name from the given resource.Usage example: ${cms.readAttributeOrProperty['/index.html']['attr']}
- Returns:
- a lazy loading map for accessing attributes / properties
-
getReadCategories
public CmsJspCategoryAccessBean getReadCategories()
Reads the categories assigned to the currently requested URI.- Returns:
- the categories assigned to the currently requested URI.
-
getReadCategory
public java.util.Map<java.lang.String,CmsCategory> getReadCategory()
Transforms the category path of a category to the category.- Returns:
- a map from root or site path to category.
-
getReadPathCategories
public java.util.Map<java.lang.String,java.util.List<CmsCategory>> getReadPathCategories()
Transforms the category path to the list of all categories on that path.Example: For path
"location/europe/"
the list[getReadCategory.get("location/"),getReadCategory.get("location/europe/")]
is returned.- Returns:
- a map from a category path to list of categories on that path.
-
getReadResourceCategories
public java.util.Map<java.lang.String,CmsJspCategoryAccessBean> getReadResourceCategories()
Reads the categories assigned to a resource.- Returns:
- map from the resource path (root path) to the assigned categories
-
getReloadMarker
public java.lang.String getReloadMarker()
Returns a HTML comment string that will cause the container page editor to reload the page if the element or its settings were edited.- Returns:
- the reload marker
-
getRequest
public javax.servlet.ServletRequest getRequest()
Gets the stored request.- Returns:
- the stored request
-
getRequestContext
public CmsRequestContext getRequestContext()
Returns the request context.- Returns:
- the request context
-
getSitemapConfig
public CmsJspSitemapConfigWrapper getSitemapConfig()
Gets the wrapper for the sitemap configuration.- Returns:
- the wrapper object for the sitemap configuration
-
getSitePath
public java.util.Map<java.lang.String,java.lang.String> getSitePath()
Transforms root paths to site paths.- Returns:
- lazy map from root paths to site paths.
- See Also:
CmsRequestContext.removeSiteRoot(String)
-
getSubSitePath
public java.lang.String getSubSitePath()
Returns the subsite path for the currently requested URI.- Returns:
- the subsite path
-
getSystemInfo
public CmsSystemInfo getSystemInfo()
Returns the system information.- Returns:
- the system information
-
getTemplate
public CmsJspStandardContextBean.TemplateBean getTemplate()
Gets a bean containing information about the current template.- Returns:
- the template information bean
-
getTitle
public java.lang.String getTitle()
Returns the title of a page delivered from OpenCms, usually used for the<title>
tag of a HTML page.If no title information has been found, the empty String "" is returned.
- Returns:
- the title of the current page
-
getTitleLocale
public java.util.Map<java.lang.String,java.lang.String> getTitleLocale()
Get the title and read the Title property according the provided locale.- Returns:
- The map from locales to the locale specific titles.
-
getTypeDetailPage
public java.util.Map<java.lang.String,java.lang.String> getTypeDetailPage()
Returns a lazy initialized Map that provides the detail page link as a value when given the name of a resource type as a key.The provided Map key is assumed to be the name of a resource type that has a detail page configured.
Usage example on a JSP with the JSTL:
<a href=${cms.typeDetailPage['bs-blog']} />
- Returns:
- a lazy initialized Map that provides the detail page link as a value when given the name of a resource type as a key
- See Also:
getFunctionDetailPage()
-
getVfs
public CmsJspVfsAccessBean getVfs()
Returns an initialized VFS access bean.- Returns:
- an initialized VFS access bean
-
getWorkplaceLocale
public java.util.Locale getWorkplaceLocale()
Returns the workplace locale from the current user's settings.- Returns:
- returns the workplace locale from the current user's settings
-
getWrap
public java.util.Map<java.lang.Object,java.lang.Object> getWrap()
Returns an EL access wrapper map for the given object.If the object is a
CmsResource
, then aCmsJspResourceWrapper
is returned. Otherwise the object is wrapped in aCmsJspObjectValueWrapper
.If the object is already is a wrapper, it is returned unchanged.
- Returns:
- an EL access wrapper map for the given object
-
initPage
public void initPage() throws CmsException
Initializes the requested container page.- Throws:
CmsException
- in case reading the requested resource fails
-
isDetailPageAvailable
public boolean isDetailPageAvailable()
Returnstrue
- Returns:
true
-
isDetailRequest
public boolean isDetailRequest()
Returnstrue
if this is a request to a detail resource,false
otherwise.Same as to check if
getDetailContent()
isnull
.- Returns:
true
if this is a request to a detail resource,false
otherwise
-
isDragMode
public boolean isDragMode()
Returns if the page is in drag mode.- Returns:
- if the page is in drag mode
-
isEdited
public boolean isEdited()
Returns the flag to indicate if in drag and drop mode.- Returns:
true
if in drag and drop mode
-
isModelGroupElement
public boolean isModelGroupElement()
Returns if the current element is a model group.- Returns:
true
if the current element is a model group
-
isModelGroupPage
public boolean isModelGroupPage()
Returns if the current page is used to manage model groups.- Returns:
true
if the current page is used to manage model groups
-
setContainer
public void setContainer(CmsContainerBean container)
Sets the container the currently rendered element is part of.- Parameters:
container
- the container the currently rendered element is part of
-
setDetailOnlyPage
public void setDetailOnlyPage(CmsContainerPageBean detailOnlyPage)
Sets the detail only page.- Parameters:
detailOnlyPage
- the detail only page to set
-
setDragMode
public void setDragMode(boolean isDragMode)
Sets if the page is in drag mode.- Parameters:
isDragMode
- if the page is in drag mode
-
setEdited
public void setEdited(boolean edited)
Sets the flag to indicate if in drag and drop mode.- Parameters:
edited
-true
if in drag and drop mode
-
setElement
public void setElement(CmsContainerElementBean element)
Sets the currently rendered element.- Parameters:
element
- the currently rendered element to set
-
setPage
public void setPage(CmsContainerPageBean page)
Sets the currently displayed container page.- Parameters:
page
- the currently displayed container page to set
-
updateCmsObject
public void updateCmsObject(CmsObject cms)
Updates the internally stored OpenCms user context.- Parameters:
cms
- the new OpenCms user context
-
updateRequestData
public void updateRequestData(CmsFlexRequest cmsFlexRequest)
Updates the standard context bean from the request.- Parameters:
cmsFlexRequest
- the request from which to update the data
-
getCmsObject
protected CmsObject getCmsObject()
Accessor for the CmsObject.- Returns:
- the CmsObject
-
getElementFormatter
protected I_CmsFormatterBean getElementFormatter(CmsContainerElementBean element)
Returns the formatter configuration to the given element.- Parameters:
element
- the element- Returns:
- the formatter configuration
-
getLocaleSpecificTitle
protected java.lang.String getLocaleSpecificTitle(java.util.Locale locale)
Returns the title according to the given locale.- Parameters:
locale
- the locale for which the title should be read.- Returns:
- the title according to the given locale
-
getParentElement
protected CmsContainerElementBean getParentElement(CmsContainerElementBean element)
Returns the parent element if available.- Parameters:
element
- the element- Returns:
- the parent element or null
-
getSitemapConfigInternal
protected CmsADEConfigData getSitemapConfigInternal()
Accessor for the sitemap configuration.- Returns:
- the sitemap configuration
-
readDynamicFunctionBean
protected CmsDynamicFunctionBean readDynamicFunctionBean(java.lang.String configuredName) throws CmsException
Reads a dynamic function bean, given its name in the module configuration.- Parameters:
configuredName
- the name of the dynamic function in the module configuration- Returns:
- the dynamic function bean for the dynamic function configured under that name
- Throws:
CmsException
- if something goes wrong
-
-