Class CmsContainerElement
- java.lang.Object
-
- org.opencms.ade.containerpage.shared.CmsContainerElement
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
,I_CmsHasIconClasses
- Direct Known Subclasses:
CmsContainerElementData
,CmsGroupContainer
public class CmsContainerElement extends java.lang.Object implements com.google.gwt.user.client.rpc.IsSerializable, I_CmsHasIconClasses
Bean holding basic container element information.- Since:
- 8.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsContainerElement.ModelGroupState
The model group states.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CLASS_CONTAINER
HTML class used to identify containers.static java.lang.String
CLASS_CONTAINER_ELEMENT_END_MARKER
HTML class used to identify container elements.static java.lang.String
CLASS_CONTAINER_ELEMENT_START_MARKER
HTML class used to identify container elements.static java.lang.String
CLASS_ELEMENT_ERROR
HTML class used to identify error message for elements where rendering failed to render.static java.lang.String
CLASS_GROUP_CONTAINER_ELEMENT_MARKER
HTML class used to identify group container elements.static java.lang.String
CREATE_AS_NEW
The create as new setting key.static java.lang.String
ELEMENT_INSTANCE_ID
The element instance id settings key.static java.lang.String
GROUP_CONTAINER_TYPE_NAME
The group container resource type name.static java.lang.String
INHERIT_CONTAINER_TYPE_NAME
The resource type name for inherited container references.static java.lang.String
IS_MODEL_GROUP_ALWAYS_REPLACE
The is model group always replace element setting key.static java.lang.String
MENU_CONTAINER_ID
The container id marking the edit menus.static java.lang.String
MODEL_GROUP_ID
The model group id setting key.static java.lang.String
MODEL_GROUP_STATE
The is model group element setting key.static java.lang.String
SETTING_CREATE_NEW
Key for the setting that replaces the CreateNew element.static java.lang.String
SETTING_PAGE_ID
Key for the setting used to identify which page this element was read from originally.static java.lang.String
SYSTEM_SETTING_PREFIX
Prefix for new system element settings.static java.lang.String
USE_AS_COPY_MODEL
The use as copy model setting key.
-
Constructor Summary
Constructors Constructor Description CmsContainerElement()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsContainerElement
copy()
Copies the container element.java.lang.String
getBigIconClasses()
Returns the resource type icon CSS rules.java.lang.String
getClientId()
Returns the client id.CmsUUID
getElementView()
Returns the element view this element belongs to by it's type.CmsInheritanceInfo
getInheritanceInfo()
Returns the inheritance info for this element.CmsElementLockInfo
getLockInfo()
CmsUUID
getModelGroupId()
Returns the model group id.java.lang.String
getNoEditReason()
Returns the no edit reason.java.lang.String
getResourceType()
Returns the resource type name for elements.java.lang.String
getSitePath()
Returns the site path.java.lang.String
getSmallIconClasses()
Returns the small icon CSS classes.java.lang.String
getSubTitle()
Returns the sub title.java.lang.String
getTitle()
Returns the title.boolean
hasEditHandler()
Returns if an edit handler is configured for the given resource type.boolean
hasSettings(java.lang.String containerId)
Returns if the element may have settings.boolean
hasViewPermission()
Returns if the current user has view permissions for the element resource.boolean
hasWritePermission()
Returns if the user has write permission.boolean
isCopyInModels()
Returns the copy in models flag.boolean
isCreateNew()
Reads the 'create new' status of the element.boolean
isGroupContainer()
Returns if the given element is of the type group container.boolean
isInheritContainer()
Returns if the given element is of the type inherit container.boolean
isModelGroup()
Returns if the element is a model group.boolean
isModelGroupAlwaysReplace()
Returns if all instances of this element should be replaced within a model group.boolean
isNew()
Returns if the element is new and has not been created in the VFS yet.boolean
isNewEditorDisabled()
Returns true if the new editor is disabled for this element.boolean
isReleasedAndNotExpired()
Returns if the given resource is released and not expired.boolean
isWasModelGroup()
Returns the former copy model status.void
setClientId(java.lang.String clientId)
Sets the client id.void
setCopyInModels(boolean copyInModels)
Sets the copy in models flag.void
setCreateNew(boolean createNew)
Sets the 'create new' status of the element.void
setElementView(CmsUUID elementView)
Sets the element view.void
setHasEditHandler(boolean hasEditHandler)
Sets the if an edit handler is configured for the given resource type.void
setHasSettings(boolean hasSettings)
Sets if the element may have settings.void
setIconClasses(java.lang.String iconRules)
Sets the resource type icon CSS rules.void
setInheritanceInfo(CmsInheritanceInfo inheritanceInfo)
Sets the inheritance info for this element.void
setLockInfo(CmsElementLockInfo lockInfo)
void
setModelGroupAlwaysReplace(boolean alwaysReplace)
Sets if all instances of this element should be replaced within a model group.void
setModelGroupId(CmsUUID modelGroupId)
Sets the model group id.void
setNew(boolean isNew)
Sets the 'new' flag.void
setNewEditorDisabled(boolean disabled)
Disables the new editor for this element.void
setPermissionInfo(CmsPermissionInfo permissionInfo)
Sets the permission info.void
setReleasedAndNotExpired(boolean releasedAndNotExpired)
Sets if the given resource is released and not expired.void
setResourceType(java.lang.String resourceType)
Sets the element resource type.void
setSitePath(java.lang.String sitePath)
Sets the site path.void
setSubTitle(java.lang.String subTitle)
Sets the sub title.void
setTitle(java.lang.String title)
Sets the title.void
setWasModelGroup(boolean wasModelGroup)
Sets the was model group flag.
-
-
-
Field Detail
-
CLASS_CONTAINER
public static final java.lang.String CLASS_CONTAINER
HTML class used to identify containers.- See Also:
- Constant Field Values
-
CLASS_CONTAINER_ELEMENT_END_MARKER
public static final java.lang.String CLASS_CONTAINER_ELEMENT_END_MARKER
HTML class used to identify container elements.- See Also:
- Constant Field Values
-
CLASS_CONTAINER_ELEMENT_START_MARKER
public static final java.lang.String CLASS_CONTAINER_ELEMENT_START_MARKER
HTML class used to identify container elements.- See Also:
- Constant Field Values
-
CLASS_ELEMENT_ERROR
public static final java.lang.String CLASS_ELEMENT_ERROR
HTML class used to identify error message for elements where rendering failed to render.- See Also:
- Constant Field Values
-
CLASS_GROUP_CONTAINER_ELEMENT_MARKER
public static final java.lang.String CLASS_GROUP_CONTAINER_ELEMENT_MARKER
HTML class used to identify group container elements.- See Also:
- Constant Field Values
-
CREATE_AS_NEW
public static final java.lang.String CREATE_AS_NEW
The create as new setting key.- See Also:
- Constant Field Values
-
ELEMENT_INSTANCE_ID
public static final java.lang.String ELEMENT_INSTANCE_ID
The element instance id settings key.- See Also:
- Constant Field Values
-
GROUP_CONTAINER_TYPE_NAME
public static final java.lang.String GROUP_CONTAINER_TYPE_NAME
The group container resource type name.- See Also:
- Constant Field Values
-
INHERIT_CONTAINER_TYPE_NAME
public static final java.lang.String INHERIT_CONTAINER_TYPE_NAME
The resource type name for inherited container references.- See Also:
- Constant Field Values
-
IS_MODEL_GROUP_ALWAYS_REPLACE
public static final java.lang.String IS_MODEL_GROUP_ALWAYS_REPLACE
The is model group always replace element setting key.- See Also:
- Constant Field Values
-
MENU_CONTAINER_ID
public static final java.lang.String MENU_CONTAINER_ID
The container id marking the edit menus.- See Also:
- Constant Field Values
-
MODEL_GROUP_ID
public static final java.lang.String MODEL_GROUP_ID
The model group id setting key.- See Also:
- Constant Field Values
-
SYSTEM_SETTING_PREFIX
public static final java.lang.String SYSTEM_SETTING_PREFIX
Prefix for new system element settings.- See Also:
- Constant Field Values
-
MODEL_GROUP_STATE
public static final java.lang.String MODEL_GROUP_STATE
The is model group element setting key.- See Also:
- Constant Field Values
-
SETTING_CREATE_NEW
public static final java.lang.String SETTING_CREATE_NEW
Key for the setting that replaces the CreateNew element.- See Also:
- Constant Field Values
-
SETTING_PAGE_ID
public static final java.lang.String SETTING_PAGE_ID
Key for the setting used to identify which page this element was read from originally.This setting is not stored when saving a container page.
- See Also:
- Constant Field Values
-
USE_AS_COPY_MODEL
public static final java.lang.String USE_AS_COPY_MODEL
The use as copy model setting key.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsContainerElement
public CmsContainerElement()
Default constructor.
-
-
Method Detail
-
copy
public CmsContainerElement copy()
Copies the container element.- Returns:
- the new copy of the container element
-
getBigIconClasses
public java.lang.String getBigIconClasses()
Returns the resource type icon CSS rules.- Specified by:
getBigIconClasses
in interfaceI_CmsHasIconClasses
- Returns:
- the resource type icon CSS rules
-
getClientId
public java.lang.String getClientId()
Returns the client id.- Returns:
- the client id
-
getElementView
public CmsUUID getElementView()
Returns the element view this element belongs to by it's type.- Returns:
- the element view
-
getInheritanceInfo
public CmsInheritanceInfo getInheritanceInfo()
Returns the inheritance info for this element.- Returns:
- the inheritance info for this element
-
getLockInfo
public CmsElementLockInfo getLockInfo()
-
getModelGroupId
public CmsUUID getModelGroupId()
Returns the model group id.- Returns:
- the model group id
-
getNoEditReason
public java.lang.String getNoEditReason()
Returns the no edit reason. If empty editing is allowed.- Returns:
- the no edit reason
-
getResourceType
public java.lang.String getResourceType()
Returns the resource type name for elements.- Returns:
- the resource type name
-
getSitePath
public java.lang.String getSitePath()
Returns the site path.- Returns:
- the site path
-
getSmallIconClasses
public java.lang.String getSmallIconClasses()
Description copied from interface:I_CmsHasIconClasses
Returns the small icon CSS classes.- Specified by:
getSmallIconClasses
in interfaceI_CmsHasIconClasses
- Returns:
- the small icon CSS classes
- See Also:
I_CmsHasIconClasses.getSmallIconClasses()
-
getSubTitle
public java.lang.String getSubTitle()
Returns the sub title.- Returns:
- the sub title
-
getTitle
public java.lang.String getTitle()
Returns the title.- Returns:
- the title
-
hasEditHandler
public boolean hasEditHandler()
Returns if an edit handler is configured for the given resource type.- Returns:
true
if an edit handler is configured for the given resource type
-
hasSettings
public boolean hasSettings(java.lang.String containerId)
Returns if the element may have settings.- Parameters:
containerId
- the container id- Returns:
true
if the element may have settings
-
hasViewPermission
public boolean hasViewPermission()
Returns if the current user has view permissions for the element resource.- Returns:
true
if the current user has view permissions for the element resource
-
hasWritePermission
public boolean hasWritePermission()
Returns if the user has write permission.- Returns:
true
if the user has write permission
-
isCopyInModels
public boolean isCopyInModels()
Returns the copy in models flag.- Returns:
- the copy in models flag
-
isCreateNew
public boolean isCreateNew()
Reads the 'create new' status of the element.When the page containing the element is used a model page, this flag determines whether a copy of the element is created when creating a new page from that model page.
- Returns:
- the 'create new' status of the element
-
isGroupContainer
public boolean isGroupContainer()
Returns if the given element is of the type group container.- Returns:
true
if the given element is of the type group container
-
isInheritContainer
public boolean isInheritContainer()
Returns if the given element is of the type inherit container.- Returns:
true
if the given element is of the type inherit container
-
isModelGroup
public boolean isModelGroup()
Returns if the element is a model group.- Returns:
true
if the element is a model group
-
isModelGroupAlwaysReplace
public boolean isModelGroupAlwaysReplace()
Returns if all instances of this element should be replaced within a model group.- Returns:
true
if all instances of this element should be replaced within a model group
-
isNew
public boolean isNew()
Returns if the element is new and has not been created in the VFS yet.- Returns:
true
if the element is not created in the VFS yet
-
isNewEditorDisabled
public boolean isNewEditorDisabled()
Returns true if the new editor is disabled for this element.- Returns:
- true if the new editor is disabled for this element
-
isReleasedAndNotExpired
public boolean isReleasedAndNotExpired()
Returns if the given resource is released and not expired.- Returns:
true
if the given resource is released and not expired
-
isWasModelGroup
public boolean isWasModelGroup()
Returns the former copy model status.- Returns:
- the former copy model status
-
setClientId
public void setClientId(java.lang.String clientId)
Sets the client id.- Parameters:
clientId
- the client id to set
-
setCopyInModels
public void setCopyInModels(boolean copyInModels)
Sets the copy in models flag.- Parameters:
copyInModels
- the copy in models flag to set
-
setCreateNew
public void setCreateNew(boolean createNew)
Sets the 'create new' status of the element.- Parameters:
createNew
- the new 'create new' status
-
setElementView
public void setElementView(CmsUUID elementView)
Sets the element view.- Parameters:
elementView
- the element view to set
-
setHasEditHandler
public void setHasEditHandler(boolean hasEditHandler)
Sets the if an edit handler is configured for the given resource type.- Parameters:
hasEditHandler
- if an edit handler is configured for the given resource type
-
setHasSettings
public void setHasSettings(boolean hasSettings)
Sets if the element may have settings.- Parameters:
hasSettings
-true
if the element may have settings
-
setIconClasses
public void setIconClasses(java.lang.String iconRules)
Sets the resource type icon CSS rules.- Parameters:
iconRules
- resource type icon CSS rules to set
-
setInheritanceInfo
public void setInheritanceInfo(CmsInheritanceInfo inheritanceInfo)
Sets the inheritance info for this element.- Parameters:
inheritanceInfo
- the inheritance info for this element to set
-
setLockInfo
public void setLockInfo(CmsElementLockInfo lockInfo)
-
setModelGroupAlwaysReplace
public void setModelGroupAlwaysReplace(boolean alwaysReplace)
Sets if all instances of this element should be replaced within a model group.- Parameters:
alwaysReplace
- if all instances of this element should be replaced within a model group
-
setModelGroupId
public void setModelGroupId(CmsUUID modelGroupId)
Sets the model group id.- Parameters:
modelGroupId
-true
if the element is a model group
-
setNew
public void setNew(boolean isNew)
Sets the 'new' flag.- Parameters:
isNew
-true
on a new element
-
setNewEditorDisabled
public void setNewEditorDisabled(boolean disabled)
Disables the new editor for this element.- Parameters:
disabled
- if true, the new editor will be disabled for this element
-
setPermissionInfo
public void setPermissionInfo(CmsPermissionInfo permissionInfo)
Sets the permission info.- Parameters:
permissionInfo
- the permission info to set
-
setReleasedAndNotExpired
public void setReleasedAndNotExpired(boolean releasedAndNotExpired)
Sets if the given resource is released and not expired.- Parameters:
releasedAndNotExpired
-true
if the given resource is released and not expired
-
setResourceType
public void setResourceType(java.lang.String resourceType)
Sets the element resource type.- Parameters:
resourceType
- the element resource type
-
setSitePath
public void setSitePath(java.lang.String sitePath)
Sets the site path.- Parameters:
sitePath
- the site path to set
-
setSubTitle
public void setSubTitle(java.lang.String subTitle)
Sets the sub title.- Parameters:
subTitle
- the sub title
-
setTitle
public void setTitle(java.lang.String title)
Sets the title.- Parameters:
title
- the title
-
setWasModelGroup
public void setWasModelGroup(boolean wasModelGroup)
Sets the was model group flag.- Parameters:
wasModelGroup
- the was model group flag to set
-
-