Class CmsContainerElementData
- java.lang.Object
-
- org.opencms.ade.containerpage.shared.CmsContainerElement
-
- org.opencms.ade.containerpage.shared.CmsContainerElementData
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
,I_CmsHasIconClasses
public class CmsContainerElementData extends CmsContainerElement
Bean holding all element information including it's formatted contents.- Since:
- 8.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.ade.containerpage.shared.CmsContainerElement
CmsContainerElement.ModelGroupState
-
-
Field Summary
-
Fields inherited from class org.opencms.ade.containerpage.shared.CmsContainerElement
CLASS_CONTAINER, CLASS_CONTAINER_ELEMENT_END_MARKER, CLASS_CONTAINER_ELEMENT_START_MARKER, CLASS_ELEMENT_ERROR, CLASS_GROUP_CONTAINER_ELEMENT_MARKER, CREATE_AS_NEW, ELEMENT_INSTANCE_ID, GROUP_CONTAINER_TYPE_NAME, INHERIT_CONTAINER_TYPE_NAME, IS_MODEL_GROUP_ALWAYS_REPLACE, MENU_CONTAINER_ID, MODEL_GROUP_ID, MODEL_GROUP_STATE, SETTING_CREATE_NEW, SETTING_PAGE_ID, SYSTEM_SETTING_PREFIX, USE_AS_COPY_MODEL
-
-
Constructor Summary
Constructors Constructor Description CmsContainerElementData()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getContents()
Returns the contents.java.util.Set<java.lang.String>
getCssResources(java.lang.String containerName)
Returns the required css resources.java.lang.String
getDescription()
Returns the description.java.lang.String
getDndId()
Dragging an element may require changing its settings, but this changes the id since it is computed from the settings.java.util.List<CmsAdditionalInfoBean>
getFormatedIndividualSettings(java.lang.String containerId)
Returns the individual element settings formated with nice-names to be used as additional-info.CmsFormatterConfig
getFormatterConfig(java.lang.String containerName)
Returns the current formatter configuration.java.util.Map<java.lang.String,CmsFormatterConfigCollection>
getFormatters()
Gets the formatter collections for the different containers.java.util.List<CmsInheritanceInfo>
getInheritanceInfos()
Returns the inheritance infos off all sub-items.java.lang.String
getInheritanceName()
Returns the inheritance name.java.lang.String
getLastModifiedByUser()
Returns the last modifying user.long
getLastModifiedDate()
Returns the last modification date.long
getLoadTime()
Returns the load time.java.lang.String
getNavText()
Returns the navText.java.util.Map<java.lang.String,CmsXmlContentProperty>
getSettingConfig(java.lang.String containerName)
Gets the setting configuration for this container element.java.util.Map<java.lang.String,java.lang.String>
getSettings()
Returns the settings for this container element.java.util.List<java.lang.String>
getSubItems()
Returns the sub-items.java.lang.String
getTitle()
Returns the supported container types.java.util.Set<java.lang.String>
getTypes()
If this element represents an element group, this method will return the supported container type.boolean
hasAlternativeFormatters(java.lang.String containerName)
Returns if there are alternative formatters available for the given container.boolean
hasSettings(java.lang.String containerId)
Returns if the element may have settings.boolean
isAddDisabled()
Returns true if the element's type is disabled in the sitemap configuration.boolean
isCopyDisabled()
Returns true if copying of the element should be disabled.boolean
isGroup()
Returns if this element is used as a group.boolean
isShowInContext(java.lang.String currentContext)
Returns true if the element should be shown in the current template context.void
setAddDisabled(boolean typeDisabled)
Sets the 'is type disabled' flag (type is disabled in the sitemap configuration).void
setContents(java.util.Map<java.lang.String,java.lang.String> contents)
Sets the contents.void
setCopyDisabled(boolean copyDisabled)
Sets the 'copy disabled' status.void
setDescription(java.lang.String description)
Sets the description.void
setDndId(java.lang.String dndId)
During dragging and dropping in the container page editor, it may be required to substitute a different element for the element being dragged.void
setFormatters(java.util.Map<java.lang.String,CmsFormatterConfigCollection> formatters)
Sets the formatter configurations.void
setGroup(boolean isGroup)
Sets if this element is used as a group.void
setInheritanceInfos(java.util.List<CmsInheritanceInfo> inheritanceInfos)
Sets the inheritance infos.void
setInheritanceName(java.lang.String inheritanceName)
Sets the inheritance name.void
setLastModifiedByUser(java.lang.String lastModifiedByUser)
Sets the modifying userdByUser.void
setLastModifiedDate(long lastModifiedDate)
Sets the last modification date.void
setLoadTime(long loadTime)
Sets the load time.void
setNavText(java.lang.String navText)
Sets the navText.void
setSettings(java.util.Map<java.lang.String,java.lang.String> settings)
Sets the settings for this container element.void
setSubItems(java.util.List<java.lang.String> subItems)
Sets the sub-items.void
setTitle(java.lang.String title)
Sets the title.void
setTypes(java.util.Set<java.lang.String> types)
Sets the supported container types.java.lang.String
toString()
-
Methods inherited from class org.opencms.ade.containerpage.shared.CmsContainerElement
copy, getBigIconClasses, getClientId, getElementView, getInheritanceInfo, getLockInfo, getModelGroupId, getNoEditReason, getResourceType, getSitePath, getSmallIconClasses, getSubTitle, hasEditHandler, hasViewPermission, hasWritePermission, isCopyInModels, isCreateNew, isGroupContainer, isInheritContainer, isModelGroup, isModelGroupAlwaysReplace, isNew, isNewEditorDisabled, isReleasedAndNotExpired, isWasModelGroup, setClientId, setCopyInModels, setCreateNew, setElementView, setHasEditHandler, setHasSettings, setIconClasses, setInheritanceInfo, setLockInfo, setModelGroupAlwaysReplace, setModelGroupId, setNew, setNewEditorDisabled, setPermissionInfo, setReleasedAndNotExpired, setResourceType, setSitePath, setSubTitle, setWasModelGroup
-
-
-
-
Constructor Detail
-
CmsContainerElementData
public CmsContainerElementData()
Creates a new instance.
-
-
Method Detail
-
getContents
public java.util.Map<java.lang.String,java.lang.String> getContents()
Returns the contents.- Returns:
- the contents
-
getCssResources
public java.util.Set<java.lang.String> getCssResources(java.lang.String containerName)
Returns the required css resources.- Parameters:
containerName
- the current container name- Returns:
- the required css resources
-
getDescription
public java.lang.String getDescription()
Returns the description.- Returns:
- the description
-
getDndId
public java.lang.String getDndId()
Dragging an element may require changing its settings, but this changes the id since it is computed from the settings. In the DND case this method returns the client id of the element with the changed settings.- Returns:
- the drag and drop element id, or null if it isn't available or needed
-
getFormatedIndividualSettings
public java.util.List<CmsAdditionalInfoBean> getFormatedIndividualSettings(java.lang.String containerId)
Returns the individual element settings formated with nice-names to be used as additional-info.- Parameters:
containerId
- the container id- Returns:
- the settings list
-
getFormatterConfig
public CmsFormatterConfig getFormatterConfig(java.lang.String containerName)
Returns the current formatter configuration.- Parameters:
containerName
- the current container name- Returns:
- the current formatter configuration
-
getFormatters
public java.util.Map<java.lang.String,CmsFormatterConfigCollection> getFormatters()
Gets the formatter collections for the different containers.- Returns:
- the formatter collections for the containers
-
getInheritanceInfos
public java.util.List<CmsInheritanceInfo> getInheritanceInfos()
Returns the inheritance infos off all sub-items.- Returns:
- the inheritance infos off all sub-items.
-
getInheritanceName
public java.lang.String getInheritanceName()
Returns the inheritance name.- Returns:
- the inheritance name
-
getLastModifiedByUser
public java.lang.String getLastModifiedByUser()
Returns the last modifying user.- Returns:
- the last modifying user
-
getLastModifiedDate
public long getLastModifiedDate()
Returns the last modification date.- Returns:
- the last modification date
-
getLoadTime
public long getLoadTime()
Returns the load time.- Returns:
- the load time
-
getNavText
public java.lang.String getNavText()
Returns the navText.- Returns:
- the navText
-
getSettingConfig
public java.util.Map<java.lang.String,CmsXmlContentProperty> getSettingConfig(java.lang.String containerName)
Gets the setting configuration for this container element.- Parameters:
containerName
- the current container name- Returns:
- the setting configuration map
-
getSettings
public java.util.Map<java.lang.String,java.lang.String> getSettings()
Returns the settings for this container element.- Returns:
- a map of settings
-
getSubItems
public java.util.List<java.lang.String> getSubItems()
Returns the sub-items.- Returns:
- the sub-items
-
getTitle
public java.lang.String getTitle()
Returns the supported container types.- Overrides:
getTitle
in classCmsContainerElement
- Returns:
- the supported container types
-
getTypes
public java.util.Set<java.lang.String> getTypes()
If this element represents an element group, this method will return the supported container type.- Returns:
- the supported container types
-
hasAlternativeFormatters
public boolean hasAlternativeFormatters(java.lang.String containerName)
Returns if there are alternative formatters available for the given container.- Parameters:
containerName
- the container name- Returns:
true
if there are alternative formatters available for the given container
-
hasSettings
public boolean hasSettings(java.lang.String containerId)
Description copied from class:CmsContainerElement
Returns if the element may have settings.- Overrides:
hasSettings
in classCmsContainerElement
- Parameters:
containerId
- the container id- Returns:
true
if the element may have settings- See Also:
CmsContainerElement.hasSettings(java.lang.String)
-
isAddDisabled
public boolean isAddDisabled()
Returns true if the element's type is disabled in the sitemap configuration.- Returns:
- true if the type is disabled
-
isCopyDisabled
public boolean isCopyDisabled()
Returns true if copying of the element should be disabled.- Returns:
- true if copying of the element should be disabled
-
isGroup
public boolean isGroup()
Returns if this element is used as a group.- Returns:
- if this element is used as a group
-
isShowInContext
public boolean isShowInContext(java.lang.String currentContext)
Returns true if the element should be shown in the current template context.- Parameters:
currentContext
- the current template context- Returns:
- true if the element should be shown
-
setAddDisabled
public void setAddDisabled(boolean typeDisabled)
Sets the 'is type disabled' flag (type is disabled in the sitemap configuration).- Parameters:
typeDisabled
- the new value
-
setContents
public void setContents(java.util.Map<java.lang.String,java.lang.String> contents)
Sets the contents.- Parameters:
contents
- the contents to set
-
setCopyDisabled
public void setCopyDisabled(boolean copyDisabled)
Sets the 'copy disabled' status.- Parameters:
copyDisabled
- true if copying should be disabled
-
setDescription
public void setDescription(java.lang.String description)
Sets the description.- Parameters:
description
- the description to set
-
setDndId
public void setDndId(java.lang.String dndId)
During dragging and dropping in the container page editor, it may be required to substitute a different element for the element being dragged. This sets the id of the element to substitute.- Parameters:
dndId
- the drag and drop replacement element's client id
-
setFormatters
public void setFormatters(java.util.Map<java.lang.String,CmsFormatterConfigCollection> formatters)
Sets the formatter configurations.- Parameters:
formatters
- the formatter configurations to set
-
setGroup
public void setGroup(boolean isGroup)
Sets if this element is used as a group.- Parameters:
isGroup
- if this element is used as a group
-
setInheritanceInfos
public void setInheritanceInfos(java.util.List<CmsInheritanceInfo> inheritanceInfos)
Sets the inheritance infos.- Parameters:
inheritanceInfos
- the inheritance infos to set
-
setInheritanceName
public void setInheritanceName(java.lang.String inheritanceName)
Sets the inheritance name.- Parameters:
inheritanceName
- the inheritance name to set
-
setLastModifiedByUser
public void setLastModifiedByUser(java.lang.String lastModifiedByUser)
Sets the modifying userdByUser.- Parameters:
lastModifiedByUser
- the last modifying user to set
-
setLastModifiedDate
public void setLastModifiedDate(long lastModifiedDate)
Sets the last modification date.- Parameters:
lastModifiedDate
- the last modification date to set
-
setLoadTime
public void setLoadTime(long loadTime)
Sets the load time.- Parameters:
loadTime
- the load time to set
-
setNavText
public void setNavText(java.lang.String navText)
Sets the navText.- Parameters:
navText
- the navText to set
-
setSettings
public void setSettings(java.util.Map<java.lang.String,java.lang.String> settings)
Sets the settings for this container element.- Parameters:
settings
- the new settings
-
setSubItems
public void setSubItems(java.util.List<java.lang.String> subItems)
Sets the sub-items.- Parameters:
subItems
- the sub-items to set
-
setTitle
public void setTitle(java.lang.String title)
Sets the title.- Overrides:
setTitle
in classCmsContainerElement
- Parameters:
title
- the title to set
-
setTypes
public void setTypes(java.util.Set<java.lang.String> types)
Sets the supported container types.- Parameters:
types
- the supported container types to set
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-