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:
java.lang.Cloneable
- Enclosing class:
- CmsJspStandardContextBean
public class CmsJspStandardContextBean.CmsContainerElementWrapper extends CmsContainerElementBean
Container element wrapper to add some API methods.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CmsContainerElementWrapper(CmsContainerElementBean element)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsContainerElementBean
clone()
java.lang.String
editorHash()
Returns the ADE client editor has value.boolean
equals(java.lang.Object obj)
CmsUUID
getFormatterId()
Returns the structure id of the formatter of this element.CmsUUID
getId()
Returns the structure id of the resource of this element.java.util.Map<java.lang.String,java.lang.String>
getIndividualSettings()
Returns the settings of this element.CmsInheritanceInfo
getInheritanceInfo()
Returns the inheritance info.java.lang.String
getInstanceId()
Returns the element instance id.CmsJspStandardContextBean.CmsContainerElementWrapper
getParent()
Returns the parent element if present.CmsResource
getResource()
Returns the resource of this element.java.lang.String
getResourceTypeName()
Returns the resource type name of the element resource.java.util.Map<java.lang.String,CmsJspElementSettingValueWrapper>
getSetting()
Returns a lazy initialized setting map.java.util.Map<java.lang.String,java.lang.String>
getSettings()
Returns the element settings including default values for settings not set.java.lang.String
getSitePath()
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, java.util.Locale locale, javax.servlet.ServletRequest request, java.util.Map<java.lang.String,java.lang.String> settingPresets)
Initializes the element settings.boolean
isCreateNew()
Returns if a new element should be created replacing the given one on first edit of a container-page.boolean
isGroupContainer(CmsObject cms)
Tests whether this element refers to a group container.boolean
isHistoryContent()
Checks if the element is used for displaying a historical content (usually from the history dialog).boolean
isInheritedContainer(CmsObject cms)
Returns whether this element refers to an inherited container element.boolean
isInMemoryOnly()
Returns if the represented resource is in memory only and not persisted in the VFS.boolean
isReleasedAndNotExpired()
Returns if the element resource is released and not expired.boolean
isTemporaryContent()
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.java.lang.String
toString()
-
Methods inherited from class org.opencms.xml.containerpage.CmsContainerElementBean
addFormatterSetting, cloneWithFormatter, cloneWithSettings, createElementForResourceType, ensureNewInstanceId, getTypeName, isCopyModel, isDoNotCache, isModelGroup, isModelGroupAlwaysReplace, setDoNotCache, updateIndividualSettings
-
-
-
-
Constructor Detail
-
CmsContainerElementWrapper
protected CmsContainerElementWrapper(CmsContainerElementBean element)
Constructor.- Parameters:
element
- the element to wrap
-
-
Method Detail
-
clone
public CmsContainerElementBean clone()
- Overrides:
clone
in classCmsContainerElementBean
- See Also:
CmsContainerElementBean.clone()
-
editorHash
public java.lang.String 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:
CmsContainerElementBean.editorHash()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classCmsContainerElementBean
- See Also:
CmsContainerElementBean.equals(java.lang.Object)
-
getFormatterId
public CmsUUID 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:
CmsContainerElementBean.getFormatterId()
-
getId
public CmsUUID 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:
CmsContainerElementBean.getId()
-
getIndividualSettings
public java.util.Map<java.lang.String,java.lang.String> getIndividualSettings()
Description copied from class:CmsContainerElementBean
Returns the settings of this element.- Overrides:
getIndividualSettings
in classCmsContainerElementBean
- Returns:
- the settings of this element
- See Also:
CmsContainerElementBean.getIndividualSettings()
-
getInheritanceInfo
public CmsInheritanceInfo 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:
CmsContainerElementBean.getInheritanceInfo()
-
getInstanceId
public java.lang.String getInstanceId()
Description copied from class:CmsContainerElementBean
Returns the element instance id.- Overrides:
getInstanceId
in classCmsContainerElementBean
- Returns:
- the element instance id
- See Also:
CmsContainerElementBean.getInstanceId()
-
getParent
public CmsJspStandardContextBean.CmsContainerElementWrapper getParent()
Returns the parent element if present.- Returns:
- the parent element or
null
if not available
-
getResource
public CmsResource 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:
CmsContainerElementBean.getResource()
-
getResourceTypeName
public java.lang.String getResourceTypeName()
Returns the resource type name of the element resource.- Returns:
- the resource type name
-
getSetting
public java.util.Map<java.lang.String,CmsJspElementSettingValueWrapper> getSetting()
Returns a lazy initialized setting map.The values returned in the map are instances of
A_CmsJspValueWrapper
.- Returns:
- the wrapped settings
-
getSettings
public java.util.Map<java.lang.String,java.lang.String> 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:
CmsContainerElementBean.getSettings()
-
getSitePath
public java.lang.String 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:
CmsContainerElementBean.getSitePath()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classCmsContainerElementBean
- See Also:
CmsContainerElementBean.hashCode()
-
initResource
public void initResource(CmsObject cms) throws CmsException
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:
CmsContainerElementBean.initResource(org.opencms.file.CmsObject)
-
initSettings
public void initSettings(CmsObject cms, CmsADEConfigData config, I_CmsFormatterBean formatterBean, java.util.Locale locale, javax.servlet.ServletRequest request, java.util.Map<java.lang.String,java.lang.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:
CmsContainerElementBean.initSettings(org.opencms.file.CmsObject, org.opencms.ade.configuration.CmsADEConfigData, org.opencms.xml.containerpage.I_CmsFormatterBean, java.util.Locale, javax.servlet.ServletRequest, java.util.Map)
-
isCreateNew
public boolean 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:
CmsContainerElementBean.isCreateNew()
-
isGroupContainer
public boolean isGroupContainer(CmsObject cms) throws CmsException
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:
CmsContainerElementBean.isGroupContainer(org.opencms.file.CmsObject)
-
isHistoryContent
public boolean 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:
CmsContainerElementBean.isHistoryContent()
-
isInheritedContainer
public boolean isInheritedContainer(CmsObject cms) throws CmsException
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:
CmsContainerElementBean.isInheritedContainer(org.opencms.file.CmsObject)
-
isInMemoryOnly
public boolean 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:
CmsContainerElementBean.isInMemoryOnly()
-
isReleasedAndNotExpired
public boolean 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:
CmsContainerElementBean.isReleasedAndNotExpired()
-
isTemporaryContent
public boolean 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:
CmsContainerElementBean.isTemporaryContent()
-
setFormatterId
public void setFormatterId(CmsUUID formatterId)
Description copied from class:CmsContainerElementBean
Sets the formatter id.- Overrides:
setFormatterId
in classCmsContainerElementBean
- Parameters:
formatterId
- the formatter id- See Also:
CmsContainerElementBean.setFormatterId(org.opencms.util.CmsUUID)
-
setHistoryFile
public void setHistoryFile(CmsFile file)
Description copied from class:CmsContainerElementBean
Sets a historical file.- Overrides:
setHistoryFile
in classCmsContainerElementBean
- Parameters:
file
- the historical file- See Also:
CmsContainerElementBean.setHistoryFile(org.opencms.file.CmsFile)
-
setInheritanceInfo
public void setInheritanceInfo(CmsInheritanceInfo inheritanceInfo)
Description copied from class:CmsContainerElementBean
Sets the inheritance info for this element.- Overrides:
setInheritanceInfo
in classCmsContainerElementBean
- Parameters:
inheritanceInfo
- the inheritance info- See Also:
CmsContainerElementBean.setInheritanceInfo(org.opencms.ade.containerpage.shared.CmsInheritanceInfo)
-
setTemporaryFile
public void setTemporaryFile(CmsFile elementFile)
Description copied from class:CmsContainerElementBean
Sets the element resource as a temporary file.- Overrides:
setTemporaryFile
in classCmsContainerElementBean
- Parameters:
elementFile
- the temporary file- See Also:
CmsContainerElementBean.setTemporaryFile(org.opencms.file.CmsFile)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCmsContainerElementBean
- See Also:
CmsContainerElementBean.toString()
-
-