Class CmsJspStandardContextBean
This bean is available by default in the context of an OpenCms managed JSP.
- Since:
- 8.0
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Container element wrapper to add some API methods.class
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
The element setting transformer.static class
Bean containing a template name and URI. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The attribute name of the cms object.static final String
The attribute name of the standard JSP context bean.protected static final org.apache.commons.logging.Log
The logger instance for this class.protected CmsObject
OpenCms user context.protected CmsADEConfigData
The sitemap configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this JSP context bean.Uses the default text encryption method to decrypt an encrypted string.Returns a caching hash specific to the element, it's properties and the current container width.Uses the default text encryption to encrypt an input text.boolean
Checks if the resource with the given path exists.Returns the locales available for the currently requested URI.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.Finds the folder to use for binary uploads, based on the list configuration given as an argument or the current sitemap configuration.getBundleEditorLink
(String messageKey) Generates a link to the bundle editor to edit the provided message key.getBundleEditorLink
(String messageKey, String backLinkAnchor) Generates a link to the bundle editor to edit the provided message key.getBundleEditorLink
(String messageKey, String backLinkAnchor, String backLinkParams) Generates a link to the bundle editor to edit the provided message key.getBundleEditorLink
(String messageKey, String backLinkAnchor, String backLinkParams, List<String> bundleFilters) Generates a link to the bundle editor to edit the provided message key.getBundleEditorLinkForBundle
(String messageKey, String backLinkAnchor, String backLinkParams, String bundleName) Generates a link to the bundle editor to edit the provided message key.getBundleRootPath
(String messageKey, List<String> bundleFilters) Gets the root path for the VFS-based message bundle containing the given message key.protected CmsObject
Accessor for the CmsObject.Returns the container the currently rendered element is part of.getContainerTypeInfo
(String containerType) Gets information about a given container type.Gets the CmsObject from the current Flex controller.Returns the current detail content, ornull
if no detail content is requested.Returns the structure id of the current detail content, ornull
if no detail content is requested.Returns the detail content site path, ornull
if not available.Returns the detail function page.Returns the detail only page.Returns the currently rendered element.Returns a lazy initialized map of wrapped container elements beans by container name suffix.protected I_CmsFormatterBean
Returns the formatter configuration to the given element.Returns a lazy initialized map of wrapped element resources by container name.Returns a lazy initialized map of wrapped element resources by container name suffix.Alternative method name for getReloadMarker().getFormatterInfo
(String formatterKey) Gets the formatter info wrapper for the given formatter key.getFormatterInfoForContainer
(String containerType) Gets the formatter bean for active formatters with a given container type.getFormatterInfoForDisplay
(String displayType) Gets the formatter beans for active formatters with a given display type.Gets a lazy map which can be used to access element setting defaults for a specific formatter key and setting name.Returns a lazy initialized Map which allows access to the dynamic function beans using the JSP EL.Deprecated.static String
getFunctionDetailLink
(CmsObject cms, String prefix, String functionName, boolean fullLink) Gets the link to a function detail page.static String
getFunctionDetailLinkExact
(CmsObject cms, String functionName) Gets the link to a function detail page.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.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.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
Returnstrue
if the current page is a detail page.boolean
Returnstrue
if the current request is direct edit enabled.boolean
Returnstrue
if the current request is a JSON request.boolean
Returnstrue
if the current project is the online project.boolean
Returns true if the current request is in direct edit preview mode.Returns the current locale.Gets a map providing access to the locale variants of the current page.protected String
getLocaleSpecificTitle
(Locale locale) Returns the title according to the given locale.Gets the main locale for the current page's locale group.getMeta()
Returns the meta mappings map.getPage()
Returns the currently displayed container page.Returns the container page bean for the give page and locale.Returns the current container page resource.Returns the parent container to the current container if available.Returns the instance id parent container mapping.Returns the parent element to the current element if available.protected CmsContainerElementBean
getParentElement
(CmsContainerElementBean element) Returns the parent element if available.Gets the set of plugin group names.Gets the map of plugins by group.JSP EL accessor method for retrieving the preview formatters.Reads all sub-categories below the provided category.Lazily reads the given attribute from the current sitemap or a property of the same name from the given resource.Reads the categories assigned to the currently requested URI.Transforms the category path of a category to the category.Transforms the category path to the list of all categories on that path.Reads the categories assigned to a resource.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
Gets the stored request.Returns the request context.getResourceTypeInfo
(String typeName) Gets information about a specific resource type for use in JSPs.getSchemaInfo
(String typeOrXsd) Gets the schema information bean for the given type or XSD.getSite()
Returns the current site.Gets the wrapper for the sitemap configuration.protected CmsADEConfigData
Accessor for the sitemap configuration.Transforms root paths to site paths.Returns the subsite path for the currently requested URI.Returns the system information.Gets a bean containing information about the current template.getTitle()
Returns the title of a page delivered from OpenCms, usually used for the<title>
tag of a HTML page.Get the title and read the Title property according the provided locale.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.getVfs()
Returns an initialized VFS access bean.Returns the workplace locale from the current user's settings.getWrap()
Returns an EL access wrapper map for the given object.void
initPage()
Initializes the requested container page.boolean
Returnstrue</code in case a detail page is available for the current element.
boolean
Returnstrue
if this is a request to a detail resource,false
otherwise.boolean
Returns if the page is in drag mode.boolean
isEdited()
Returns the flag to indicate if in drag and drop mode.boolean
Checks if the flag that forces edit mode to be disabled is set.boolean
isLinkToDifferentSite
(String link) Checks if the link is a link to a path in a different OpenCms site from the current one.boolean
Checks if the link is a link to a path in a different OpenCms subsite from the current one.boolean
Returns if the current element is a model group.boolean
Returns if the current page is used to manage model groups.Gets the link wrapper for the given path.protected CmsDynamicFunctionBean
readDynamicFunctionBean
(String configuredName) Reads a dynamic function bean, given its name in the module configuration.readResource
(String str) Gets the resource wrapper for a given path or id.Reads an XML content and returns it as a content access beanrenderContainer
(CmsJspContainerPageWrapper page, String name) Renders the elements of container in a container page wrapper as HTML (without a surrounding element).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.setEditorCssPath
(String path) In edit mode, creates a meta tag that tells the form-based content editor to use the stylesheet with the given path as a default.void
setElement
(CmsContainerElementBean element) Sets the currently rendered element.void
setForceDisableEditMode
(boolean forceDisableEditMode) Enables / disables the flag that forces edit mode to be disabled.void
setPage
(CmsContainerPageBean page) Sets the currently displayed container page.toResource
(Object obj) Converts the given object to a resource wrapper and returns it, or returns null if the conversion failsvoid
updateCmsObject
(CmsObject cms) Updates the internally stored OpenCms user context.void
updateRequestData
(CmsFlexRequest cmsFlexRequest) Updates the standard context bean from the request.uri()
Gets the path of either the detail content (if this is a detail request) or the current page if it's not a detail request.Returns an EL access wrapper map for the given object.protected List<CmsFormatterInfoWrapper>
wrapFormatters
(Collection<? extends I_CmsFormatterBean> formatters) Wraps a list of formatter beans for use in JSPs.
-
Field Details
-
ATTRIBUTE_CMS_OBJECT
The attribute name of the cms object.- See Also:
-
ATTRIBUTE_NAME
The attribute name of the standard JSP context bean.- See Also:
-
LOG
The logger instance for this class. -
m_cms
OpenCms user context. -
m_config
The sitemap configuration.
-
-
Method Details
-
getFunctionDetailLink
public static String getFunctionDetailLink(CmsObject cms, String prefix, 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
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
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
Returns a copy of this JSP context bean.- Returns:
- a copy of this JSP context bean
-
decrypt
Uses the default text encryption method to decrypt an encrypted string.- Parameters:
text
- the encrypted stirng- Returns:
- the decrypted string
-
elementCachingHash
Returns a caching hash specific to the element, it's properties and the current container width.- Returns:
- the caching hash
-
encrypt
Uses the default text encryption to encrypt an input text.- Parameters:
text
- the input text- Returns:
- the encrypted text
-
exists
Checks if the resource with the given path exists.- Parameters:
path
- a path- Returns:
- true if the resource exists
-
getAvailableLocales
Returns the locales available for the currently requested URI.- Returns:
- the locales available for the currently requested URI.
-
getBean
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
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
-
getBundleEditorLink
Generates a link to the bundle editor to edit the provided message key. The back link for the editor is the current uri. If the bundle for the key could not be found,null
is returned.- Parameters:
messageKey
- the message key to open the bundle editor for.- Returns:
- a link to the bundle editor for editing the provided key, or
null
if the bundle for the key could not be found.
-
getBundleEditorLink
Generates a link to the bundle editor to edit the provided message key. The back link for the editor is the current uri with the provided backLinkAnchor added as anchor.. If the bundle for the key could not be found,null
is returned.- Parameters:
messageKey
- the message key to open the bundle editor for.backLinkAnchor
- the anchor id to add to the backlink to the page. Ifnull
no anchor is added to the backlink.- Returns:
- a link to the bundle editor for editing the provided key, or
null
if the bundle for the key could not be found.
-
getBundleEditorLink
Generates a link to the bundle editor to edit the provided message key. The back link for the editor is the current uri with the provided backLinkAnchor added as anchor. If the bundle resource for the key could not be found,null
is returned.- Parameters:
messageKey
- the message key to open the bundle editor for.backLinkAnchor
- the anchor id to add to the backlink to the page. Ifnull
no anchor is added to the backlink.backLinkParams
- request parameters to add to the backlink without leading '?', e.g. "param1=a¶m2=b".- Returns:
- a link to the bundle editor for editing the provided key, or
null
if the bundle for the key could not be found.
-
getBundleEditorLink
public String getBundleEditorLink(String messageKey, String backLinkAnchor, String backLinkParams, List<String> bundleFilters) Generates a link to the bundle editor to edit the provided message key. The back link for the editor is the current uri with the provided backLinkAnchor added as anchor. If the bundle resource for the key could not be found,null
is returned.- Parameters:
messageKey
- the message key to open the bundle editor for.backLinkAnchor
- the anchor id to add to the backlink to the page. Ifnull
no anchor is added to the backlink.backLinkParams
- request parameters to add to the backlink without leading '?', e.g. "param1=a¶m2=b".bundleFilters
- substrings of names of bundles to be preferred when multiple bundles contain the key.- Returns:
- a link to the bundle editor for editing the provided key, or
null
if the bundle for the key could not be found.
-
getBundleEditorLinkForBundle
public String getBundleEditorLinkForBundle(String messageKey, String backLinkAnchor, String backLinkParams, String bundleName) Generates a link to the bundle editor to edit the provided message key. The back link for the editor is the current uri with the provided backLinkAnchor added as anchor. If the bundle resource for the key could not be found,null
is returned.- Parameters:
messageKey
- the message key to open the bundle editor for.backLinkAnchor
- the anchor id to add to the backlink to the page. Ifnull
no anchor is added to the backlink.backLinkParams
- request parameters to add to the backlink without leading '?', e.g. "param1=a¶m2=b".bundleName
- the name of the bundle to search the key in. Ifnull
the bundle is detected automatically.- Returns:
- a link to the bundle editor for editing the provided key, or
null
if the bundle for the key could not be found.
-
getBundleRootPath
Gets the root path for the VFS-based message bundle containing the given message key.If no VFS-based message bundle contains the given key, null is returned. If multiple message bundles contain it, the name filters are applied in the given order until at least one bundle matches a filter. If multiple bundles match, one of them is arbitrarily chosen (but a warning is logged). If no bundle matches, an arbitrary bundle is chosen (but also a warning is logged).
Note: This uses the online (published) state of message bundles, so if you have unpublished bundle changes, they will not be reflected in the result.
- Parameters:
messageKey
- the message keybundleFilters
- substrings of names of bundles to be preferred when multiple bundles contain the key.- Returns:
- the root path of the bundle containing the message key
-
getContainer
Returns the container the currently rendered element is part of.- Returns:
- the container the currently rendered element is part of
-
getContainerTypeInfo
Gets information about a given container type.- Parameters:
containerType
- the container type- Returns:
- the bean with the information about the container type
-
getControllerCms
Gets the CmsObject from the current Flex controller.- Returns:
- the CmsObject from the current Flex controller
-
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
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
Returns the detail content site path, ornull
if not available.- Returns:
- the detail content site path
-
getDetailFunctionPage
Returns the detail function page.- Returns:
- the detail function page
-
getDetailOnlyPage
Returns the detail only page.- Returns:
- the detail only page
-
getElement
Returns the currently rendered element.- Returns:
- the currently rendered element
-
getElementBeansInContainers
public Map<String,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
Returns a lazy initialized map of wrapped element resources by container name.- Returns:
- the lazy map of element resource wrappers
-
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:
-
getEnableReload
Alternative method name for getReloadMarker().- Returns:
- the reload marker
- See Also:
-
getFormatterInfo
Gets the formatter info wrapper for the given formatter key.- Parameters:
formatterKey
- a formatter key- Returns:
- the formatter information for the formatter key, or null if no formatter was found
-
getFormatterInfoForContainer
Gets the formatter bean for active formatters with a given container type.- Parameters:
containerType
- the container type- Returns:
- the wrapped formatters
-
getFormatterInfoForDisplay
Gets the formatter beans for active formatters with a given display type.- Parameters:
displayType
- the display type- Returns:
- the wrapped formatters
-
getFormatterSettingDefault
Gets a lazy map which can be used to access element setting defaults for a specific formatter key and setting name.- Returns:
- the lazy map
-
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.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
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:
-
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:
-
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
Returnstrue
if the current page is a detail page.- Returns:
true
if the current page is a detail page
-
getIsEditMode
Returnstrue
if the current request is direct edit enabled.Online-, history-requests, previews and temporary files will not be editable.
- Returns:
true
if the current request is direct edit enabled
-
getIsJSONRequest
Returnstrue
if the current request is a JSON request.- Returns:
true
if we are in a JSON request
-
getIsOnlineProject
Returnstrue
if the current project is the online project.- Returns:
true
if the current project is the online project
-
getIsPreviewMode
Returns true if the current request is in direct edit preview mode.This is the case if the request is not in edit mode and in the online project.
- Returns:
true
if the current request is in direct edit preview mode
-
getLocale
Returns the current locale.- Returns:
- the current locale
-
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
Gets the main locale for the current page's locale group.- Returns:
- the main locale for the current page's locale group
-
getMeta
Returns the meta mappings map.- Returns:
- the meta mappings
-
getPage
Returns the currently displayed container page.- Returns:
- the currently displayed container page
-
getPage
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
Returns the current container page resource.- Returns:
- the current container page resource
-
getParentContainer
Returns the parent container to the current container if available.- Returns:
- the parent container
-
getParentContainers
Returns the instance id parent container mapping.- Returns:
- the instance id parent container mapping
-
getParentElement
Returns the parent element to the current element if available.- Returns:
- the parent element or null
-
getPluginGroups
Gets the set of plugin group names.- Returns:
- the set of plugin group names
-
getPlugins
Gets the map of plugins by group.- Returns:
- the map of active plugins by group
-
getPreviewFormatter
JSP EL accessor method for retrieving the preview formatters.- Returns:
- a lazy map for accessing preview formatters
-
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
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
Reads the categories assigned to the currently requested URI.- Returns:
- the categories assigned to the currently requested URI.
-
getReadCategory
Transforms the category path of a category to the category.- Returns:
- a map from root or site path to category.
-
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
Reads the categories assigned to a resource.- Returns:
- map from the resource path (root path) to the assigned categories
-
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
Gets the stored request.- Returns:
- the stored request
-
getRequestContext
Returns the request context.- Returns:
- the request context
-
getResourceTypeInfo
Gets information about a specific resource type for use in JSPs.If no type with the given name exists, null is returned.
- Parameters:
typeName
- the type name- Returns:
- the bean representing the resource type
-
getSchemaInfo
Gets the schema information bean for the given type or XSD.- Parameters:
typeOrXsd
- either the name of a resource type, or the VFS path to an XSD schema- Returns:
- the schema information bean
- Throws:
CmsException
- if something goes wrong
-
getSite
Returns the current site.- Returns:
- the current site
-
getSitemapConfig
Gets the wrapper for the sitemap configuration.- Returns:
- the wrapper object for the sitemap configuration
-
getSitePath
Transforms root paths to site paths.- Returns:
- lazy map from root paths to site paths.
- See Also:
-
getSubSitePath
Returns the subsite path for the currently requested URI.- Returns:
- the subsite path
-
getSystemInfo
Returns the system information.- Returns:
- the system information
-
getTemplate
Gets a bean containing information about the current template.- Returns:
- the template information bean
-
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
Get the title and read the Title property according the provided locale.- Returns:
- The map from locales to the locale specific titles.
-
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:
-
getVfs
Returns an initialized VFS access bean.- Returns:
- an initialized VFS access bean
-
getWorkplaceLocale
Returns the workplace locale from the current user's settings.- Returns:
- returns the workplace locale from the current user's settings
-
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
Initializes the requested container page.- Throws:
CmsException
- in case reading the requested resource fails
-
isDetailPageAvailable
Returnstrue</code in case a detail page is available for the current element.
- Returns:
true</code in case a detail page is available for the current element
-
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
Returns if the page is in drag mode.- Returns:
- if the page is in drag mode
-
isEdited
Returns the flag to indicate if in drag and drop mode.- Returns:
true
if in drag and drop mode
-
isForceDisableEditMode
Checks if the flag that forces edit mode to be disabled is set.- Returns:
- true if the flag that disables edit mode is set
-
isLinkToDifferentSite
Checks if the link is a link to a path in a different OpenCms site from the current one.- Parameters:
link
- the link to check- Returns:
- true if the link is a link to different subsite
-
isLinkToDifferentSubSite
Checks if the link is a link to a path in a different OpenCms subsite from the current one.For detail links, this checks the subsite of the detail page, not the subsite of the detail content.
- Parameters:
link
- the link to check- Returns:
- true if the link is a link to different site
-
isModelGroupElement
Returns if the current element is a model group.- Returns:
true
if the current element is a model group
-
isModelGroupPage
Returns if the current page is used to manage model groups.- Returns:
true
if the current page is used to manage model groups
-
link
Gets the link wrapper for the given path.- Parameters:
path
- the path- Returns:
- the link wrapper
-
readResource
Gets the resource wrapper for a given path or id.- Parameters:
str
- a path or structure id- Returns:
- the wrapper for the resource with the given path or id
-
readXml
Reads an XML content and returns it as a content access bean- Parameters:
str
- path or id- Returns:
- the content access bean for the content with the given path or id
-
renderContainer
Renders the elements of container in a container page wrapper as HTML (without a surrounding element).- Parameters:
page
- the page wrappername
- the name or name prefix of the container- Returns:
- the rendered HTML
-
setContainer
Sets the container the currently rendered element is part of.- Parameters:
container
- the container the currently rendered element is part of
-
setDetailOnlyPage
Sets the detail only page.- Parameters:
detailOnlyPage
- the detail only page to set
-
setDragMode
Sets if the page is in drag mode.- Parameters:
isDragMode
- if the page is in drag mode
-
setEdited
Sets the flag to indicate if in drag and drop mode.- Parameters:
edited
-true
if in drag and drop mode
-
setEditorCssPath
In edit mode, creates a meta tag that tells the form-based content editor to use the stylesheet with the given path as a default.Does nothing outside of edit mode.
- Parameters:
path
- the site path of a style sheet- Returns:
- the meta tag
-
setElement
Sets the currently rendered element.- Parameters:
element
- the currently rendered element to set
-
setForceDisableEditMode
Enables / disables the flag that forces edit mode to be disabled.- Parameters:
forceDisableEditMode
- the new value for the flag
-
setPage
Sets the currently displayed container page.- Parameters:
page
- the currently displayed container page to set
-
toResource
Converts the given object to a resource wrapper and returns it, or returns null if the conversion fails- Parameters:
obj
- the object to convert- Returns:
- the resource wrapper
-
updateCmsObject
Updates the internally stored OpenCms user context.- Parameters:
cms
- the new OpenCms user context
-
updateRequestData
Updates the standard context bean from the request.- Parameters:
cmsFlexRequest
- the request from which to update the data
-
uri
Gets the path of either the detail content (if this is a detail request) or the current page if it's not a detail request.- Returns:
- the URI of the page or detail content
-
wrap
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.
- Parameters:
obj
- the object to wrap- Returns:
- an EL access wrapper map for the given object
-
getCmsObject
Accessor for the CmsObject.- Returns:
- the CmsObject
-
getElementFormatter
Returns the formatter configuration to the given element.- Parameters:
element
- the element- Returns:
- the formatter configuration
-
getLocaleSpecificTitle
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
Returns the parent element if available.- Parameters:
element
- the element- Returns:
- the parent element or null
-
getSitemapConfigInternal
Accessor for the sitemap configuration.- Returns:
- the sitemap configuration
-
readDynamicFunctionBean
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
-
wrapFormatters
protected List<CmsFormatterInfoWrapper> wrapFormatters(Collection<? extends I_CmsFormatterBean> formatters) Wraps a list of formatter beans for use in JSPs.- Parameters:
formatters
- the formatters to wrap- Returns:
- the wrapped formatters
-
getFunctionDetailPage()
instead