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 Object
implements com.google.gwt.user.client.rpc.IsSerializable, I_CmsHasIconClasses
Bean holding basic container element information.
- Since:
- 8.0.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The model group states. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
HTML class used to identify containers.static final String
HTML class used to identify container elements.static final String
HTML class used to identify container elements.static final String
HTML class used to identify error message for elements where rendering failed to render.static final String
HTML class used to identify group container elements.static final String
The create as new setting key.static final String
The element instance id settings key.static final String
The group container resource type name.static final String
The resource type name for inherited container references.static final String
The is model group always replace element setting key.static final String
The container id marking the edit menus.static final String
The model group id setting key.static final String
The is model group element setting key.static final String
Key for the setting that replaces the CreateNew element.static final String
Key for the setting used to identify which page this element was read from originally.static final String
Prefix for new system element settings.static final String
The use as copy model setting key. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Copies the container element.Returns the resource type icon CSS rules.Returns the client id.Returns the element view this element belongs to by it's type.Returns the inheritance info for this element.Returns the model group id.Returns the no edit reason.Returns the resource type name for elements.Returns the site path.Returns the small icon CSS classes.Returns the sub title.getTitle()
Returns the title.boolean
Returns if an edit handler is configured for the given resource type.boolean
hasSettings
(String containerId) Returns if the element may have settings.boolean
Returns if the current user has view permissions for the element resource.boolean
Returns if the user has write permission.boolean
Returns the copy in models flag.boolean
Reads the 'create new' status of the element.boolean
Returns if the given element is of the type group container.boolean
Returns if the given element is of the type inherit container.boolean
Returns if the element is a model group.boolean
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
Returns true if the new editor is disabled for this element.boolean
Returns if the given resource is released and not expired.boolean
isReused()
True if the element is marked as reused.boolean
Returns the former copy model status.void
setClientId
(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
(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
(String resourceType) Sets the element resource type.void
setReused
(boolean reused) Sets the 'reused' status.void
setSitePath
(String sitePath) Sets the site path.void
setSubTitle
(String subTitle) Sets the sub title.void
Sets the title.void
setWasModelGroup
(boolean wasModelGroup) Sets the was model group flag.
-
Field Details
-
CLASS_CONTAINER
HTML class used to identify containers.- See Also:
-
CLASS_CONTAINER_ELEMENT_END_MARKER
HTML class used to identify container elements.- See Also:
-
CLASS_CONTAINER_ELEMENT_START_MARKER
HTML class used to identify container elements.- See Also:
-
CLASS_ELEMENT_ERROR
HTML class used to identify error message for elements where rendering failed to render.- See Also:
-
CLASS_GROUP_CONTAINER_ELEMENT_MARKER
HTML class used to identify group container elements.- See Also:
-
CREATE_AS_NEW
The create as new setting key.- See Also:
-
ELEMENT_INSTANCE_ID
The element instance id settings key.- See Also:
-
GROUP_CONTAINER_TYPE_NAME
The group container resource type name.- See Also:
-
INHERIT_CONTAINER_TYPE_NAME
The resource type name for inherited container references.- See Also:
-
IS_MODEL_GROUP_ALWAYS_REPLACE
The is model group always replace element setting key.- See Also:
-
MENU_CONTAINER_ID
The container id marking the edit menus.- See Also:
-
MODEL_GROUP_ID
The model group id setting key.- See Also:
-
SYSTEM_SETTING_PREFIX
Prefix for new system element settings.- See Also:
-
MODEL_GROUP_STATE
The is model group element setting key.- See Also:
-
SETTING_CREATE_NEW
Key for the setting that replaces the CreateNew element.- See Also:
-
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:
-
USE_AS_COPY_MODEL
The use as copy model setting key.- See Also:
-
-
Constructor Details
-
CmsContainerElement
public CmsContainerElement()Default constructor.
-
-
Method Details
-
copy
Copies the container element.- Returns:
- the new copy of the container element
-
getBigIconClasses
Returns the resource type icon CSS rules.- Specified by:
getBigIconClasses
in interfaceI_CmsHasIconClasses
- Returns:
- the resource type icon CSS rules
-
getClientId
Returns the client id.- Returns:
- the client id
-
getElementView
Returns the element view this element belongs to by it's type.- Returns:
- the element view
-
getInheritanceInfo
Returns the inheritance info for this element.- Returns:
- the inheritance info for this element
-
getLockInfo
-
getModelGroupId
Returns the model group id.- Returns:
- the model group id
-
getNoEditReason
Returns the no edit reason. If empty editing is allowed.- Returns:
- the no edit reason
-
getResourceType
Returns the resource type name for elements.- Returns:
- the resource type name
-
getSitePath
Returns the site path.- Returns:
- the site path
-
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:
-
getSubTitle
Returns the sub title.- Returns:
- the sub title
-
getTitle
Returns the title.- Returns:
- the title
-
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
Returns if the element may have settings.- Parameters:
containerId
- the container id- Returns:
true
if the element may have settings
-
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
Returns if the user has write permission.- Returns:
true
if the user has write permission
-
isCopyInModels
Returns the copy in models flag.- Returns:
- the copy in models flag
-
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
Returns if the given element is of the type group container.- Returns:
true
if the given element is of the type group container
-
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
Returns if the element is a model group.- Returns:
true
if the element is a model group
-
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
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
Returns true if the new editor is disabled for this element.- Returns:
- true if the new editor is disabled for this element
-
isReleasedAndNotExpired
Returns if the given resource is released and not expired.- Returns:
true
if the given resource is released and not expired
-
isReused
True if the element is marked as reused.- Returns:
- true if the element is marked as reused
-
isWasModelGroup
Returns the former copy model status.- Returns:
- the former copy model status
-
setClientId
Sets the client id.- Parameters:
clientId
- the client id to set
-
setCopyInModels
Sets the copy in models flag.- Parameters:
copyInModels
- the copy in models flag to set
-
setCreateNew
Sets the 'create new' status of the element.- Parameters:
createNew
- the new 'create new' status
-
setElementView
Sets the element view.- Parameters:
elementView
- the element view to set
-
setHasEditHandler
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
Sets if the element may have settings.- Parameters:
hasSettings
-true
if the element may have settings
-
setIconClasses
Sets the resource type icon CSS rules.- Parameters:
iconRules
- resource type icon CSS rules to set
-
setModelGroupAlwaysReplace
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
Sets the model group id.- Parameters:
modelGroupId
-true
if the element is a model group
-
setNew
Sets the 'new' flag.- Parameters:
isNew
-true
on a new element
-
setNewEditorDisabled
Disables the new editor for this element.- Parameters:
disabled
- if true, the new editor will be disabled for this element
-
setReleasedAndNotExpired
Sets if the given resource is released and not expired.- Parameters:
releasedAndNotExpired
-true
if the given resource is released and not expired
-
setResourceType
Sets the element resource type.- Parameters:
resourceType
- the element resource type
-
setReused
Sets the 'reused' status.- Parameters:
reused
- the 'reused' status
-
setSitePath
Sets the site path.- Parameters:
sitePath
- the site path to set
-
setSubTitle
Sets the sub title.- Parameters:
subTitle
- the sub title
-
setTitle
Sets the title.- Parameters:
title
- the title
-
setWasModelGroup
Sets the was model group flag.- Parameters:
wasModelGroup
- the was model group flag to set
-