Package org.opencms.jsp.util
Class CmsJspStandardContextBean.CmsContainerElementWrapper
java.lang.Object
org.opencms.xml.containerpage.CmsContainerElementBean
org.opencms.jsp.util.CmsJspStandardContextBean.CmsContainerElementWrapper
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- CmsJspStandardContextBean
Container element wrapper to add some API methods.
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns the ADE client editor has value.boolean
Returns the structure id of the formatter of this element.Returns the formatter key, if possible, otherwise the formatter configuration id, or null if nothing at all can be found.getId()
Returns the structure id of the resource of this element.Returns the settings of this element.Returns the inheritance info.Returns the element instance id.Returns the parent element if present.Returns the resource of this element.Returns the resource type name of the element resource.Returns a lazy initialized setting map.Returns the element settings including default values for settings not set.Returns the site path of the resource of this element.int
hashCode()
void
initResource
(CmsObject cms) Initializes the resource and the site path of this element.void
initSettings
(CmsObject cms, CmsADEConfigData config, I_CmsFormatterBean formatterBean, Locale locale, javax.servlet.ServletRequest request, Map<String, String> settingPresets) Initializes the element settings.boolean
Returns if a new element should be created replacing the given one on first edit of a container-page.boolean
Tests whether this element refers to a group container.boolean
Checks if the element is used for displaying a historical content (usually from the history dialog).boolean
Returns whether this element refers to an inherited container element.boolean
Returns if the represented resource is in memory only and not persisted in the VFS.boolean
Returns if the element resource is released and not expired.boolean
Returns if the element resource contains temporary file content.void
setFormatterId
(CmsUUID formatterId) Sets the formatter id.void
setHistoryFile
(CmsFile file) Sets a historical file.void
setInheritanceInfo
(CmsInheritanceInfo inheritanceInfo) Sets the inheritance info for this element.void
setTemporaryFile
(CmsFile elementFile) Sets the element resource as a temporary file.toString()
Methods inherited from class org.opencms.xml.containerpage.CmsContainerElementBean
addFormatterSetting, cloneWithFormatter, cloneWithSettings, createElementForResourceType, ensureNewInstanceId, getTypeName, isCopyModel, isDoNotCache, isModelGroup, isModelGroupAlwaysReplace, setDoNotCache, updateIndividualSettings
-
Constructor Details
-
CmsContainerElementWrapper
Constructor.- Parameters:
element
- the element to wrap
-
-
Method Details
-
clone
- Overrides:
clone
in classCmsContainerElementBean
- See Also:
-
editorHash
Description copied from class:CmsContainerElementBean
Returns the ADE client editor has value.- Overrides:
editorHash
in classCmsContainerElementBean
- Returns:
- the ADE client editor has value
- See Also:
-
equals
- Overrides:
equals
in classCmsContainerElementBean
- See Also:
-
getFormatterId
Description copied from class:CmsContainerElementBean
Returns the structure id of the formatter of this element.- Overrides:
getFormatterId
in classCmsContainerElementBean
- Returns:
- the structure id of the formatter of this element
- See Also:
-
getFormatterKey
Returns the formatter key, if possible, otherwise the formatter configuration id, or null if nothing at all can be found.- Returns:
- the formatter key
-
getId
Description copied from class:CmsContainerElementBean
Returns the structure id of the resource of this element.- Overrides:
getId
in classCmsContainerElementBean
- Returns:
- the structure id of the resource of this element
- See Also:
-
getIndividualSettings
Description copied from class:CmsContainerElementBean
Returns the settings of this element.- Overrides:
getIndividualSettings
in classCmsContainerElementBean
- Returns:
- the settings of this element
- See Also:
-
getInheritanceInfo
Description copied from class:CmsContainerElementBean
Returns the inheritance info.- Overrides:
getInheritanceInfo
in classCmsContainerElementBean
- Returns:
- the inheritance info or
null
if not available - See Also:
-
getInstanceId
Description copied from class:CmsContainerElementBean
Returns the element instance id.- Overrides:
getInstanceId
in classCmsContainerElementBean
- Returns:
- the element instance id
- See Also:
-
getParent
Returns the parent element if present.- Returns:
- the parent element or
null
if not available
-
getResource
Description copied from class:CmsContainerElementBean
Returns the resource of this element.It is required to call
CmsContainerElementBean.initResource(CmsObject)
before this method can be used.- Overrides:
getResource
in classCmsContainerElementBean
- Returns:
- the resource of this element
- See Also:
-
getResourceTypeName
Returns the resource type name of the element resource.- Returns:
- the resource type name
-
getSetting
Returns a lazy initialized setting map.The values returned in the map are instances of
A_CmsJspValueWrapper
.- Returns:
- the wrapped settings
-
getSettings
Description copied from class:CmsContainerElementBean
Returns the element settings including default values for settings not set.Will return
null
if the element bean has not been initialized withCmsContainerElementBean.initResource(org.opencms.file.CmsObject)
.- Overrides:
getSettings
in classCmsContainerElementBean
- Returns:
- the element settings
- See Also:
-
getSitePath
Description copied from class:CmsContainerElementBean
Returns the site path of the resource of this element.It is required to call
CmsContainerElementBean.initResource(CmsObject)
before this method can be used.- Overrides:
getSitePath
in classCmsContainerElementBean
- Returns:
- the site path of the resource of this element
- See Also:
-
hashCode
- Overrides:
hashCode
in classCmsContainerElementBean
- See Also:
-
initResource
Description copied from class:CmsContainerElementBean
Initializes the resource and the site path of this element.- Overrides:
initResource
in classCmsContainerElementBean
- Parameters:
cms
- the CMS context- Throws:
CmsException
- if something goes wrong reading the element resource- See Also:
-
initSettings
public void initSettings(CmsObject cms, CmsADEConfigData config, I_CmsFormatterBean formatterBean, Locale locale, javax.servlet.ServletRequest request, Map<String, String> settingPresets) Description copied from class:CmsContainerElementBean
Initializes the element settings.- Overrides:
initSettings
in classCmsContainerElementBean
- Parameters:
cms
- the CMS contextformatterBean
- the formatter configuration beanlocale
- the content localerequest
- the current request, if availablesettingPresets
- the presets for container element settings- See Also:
-
isCreateNew
Description copied from class:CmsContainerElementBean
Returns if a new element should be created replacing the given one on first edit of a container-page.- Overrides:
isCreateNew
in classCmsContainerElementBean
- Returns:
true
if a new element should be created replacing the given one on first edit of a container-page- See Also:
-
isGroupContainer
Description copied from class:CmsContainerElementBean
Tests whether this element refers to a group container.- Overrides:
isGroupContainer
in classCmsContainerElementBean
- Parameters:
cms
- the CmsObject used for VFS operations- Returns:
true
if the container element refers to a group container- Throws:
CmsException
- if something goes wrong- See Also:
-
isHistoryContent
Description copied from class:CmsContainerElementBean
Checks if the element is used for displaying a historical content (usually from the history dialog).- Overrides:
isHistoryContent
in classCmsContainerElementBean
- Returns:
- true if the element is used for displaying a historical content
- See Also:
-
isInheritedContainer
Description copied from class:CmsContainerElementBean
Returns whether this element refers to an inherited container element.- Overrides:
isInheritedContainer
in classCmsContainerElementBean
- Parameters:
cms
- the CmsObject used for VFS operations- Returns:
true
if the container element refers to an inherited container- Throws:
CmsException
- if something goes wrong- See Also:
-
isInMemoryOnly
Description copied from class:CmsContainerElementBean
Returns if the represented resource is in memory only and not persisted in the VFS.- Overrides:
isInMemoryOnly
in classCmsContainerElementBean
- Returns:
true
if the represented resource is in memory only and not persisted in the VFS- See Also:
-
isReleasedAndNotExpired
Description copied from class:CmsContainerElementBean
Returns if the element resource is released and not expired.- Overrides:
isReleasedAndNotExpired
in classCmsContainerElementBean
- Returns:
true
if the element resource is released and not expired- See Also:
-
isTemporaryContent
Description copied from class:CmsContainerElementBean
Returns if the element resource contains temporary file content.- Overrides:
isTemporaryContent
in classCmsContainerElementBean
- Returns:
true
if the element resource contains temporary file content- See Also:
-
setFormatterId
Description copied from class:CmsContainerElementBean
Sets the formatter id.- Overrides:
setFormatterId
in classCmsContainerElementBean
- Parameters:
formatterId
- the formatter id- See Also:
-
setHistoryFile
Description copied from class:CmsContainerElementBean
Sets a historical file.- Overrides:
setHistoryFile
in classCmsContainerElementBean
- Parameters:
file
- the historical file- See Also:
-
setTemporaryFile
Description copied from class:CmsContainerElementBean
Sets the element resource as a temporary file.- Overrides:
setTemporaryFile
in classCmsContainerElementBean
- Parameters:
elementFile
- the temporary file- See Also:
-
toString
- Overrides:
toString
in classCmsContainerElementBean
- See Also:
-