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
Nested ClassesModifier and TypeClassDescriptionstatic enumThe model group states. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringHTML class used to identify containers.static final StringHTML class used to identify container elements.static final StringHTML class used to identify container elements.static final StringHTML class used to identify error message for elements where rendering failed to render.static final StringHTML class used to identify group container elements.static final StringThe create as new setting key.static final StringThe element instance id settings key.static final StringThe group container resource type name.static final StringThe resource type name for inherited container references.static final StringThe is model group always replace element setting key.static final StringThe container id marking the edit menus.static final StringThe model group id setting key.static final StringThe is model group element setting key.static final StringKey for the setting that replaces the CreateNew element.static final StringKey for the setting used to identify which page this element was read from originally.static final StringPrefix for new system element settings.static final StringThe use as copy model setting key. -
Constructor Summary
Constructors -
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.booleanReturns if an edit handler is configured for the given resource type.booleanhasSettings(String containerId) Returns if the element may have settings.booleanReturns if the current user has view permissions for the element resource.booleanReturns if the user has write permission.booleanReturns the copy in models flag.booleanReads the 'create new' status of the element.booleanReturns if the given element is of the type group container.booleanReturns if the given element is of the type inherit container.booleanReturns if the element is a model group.booleanReturns if all instances of this element should be replaced within a model group.booleanisNew()Returns if the element is new and has not been created in the VFS yet.booleanReturns true if the new editor is disabled for this element.booleanReturns if the given resource is released and not expired.booleanisReused()True if the element is marked as reused.booleanReturns the former copy model status.voidsetClientId(String clientId) Sets the client id.voidsetCopyInModels(boolean copyInModels) Sets the copy in models flag.voidsetCreateNew(boolean createNew) Sets the 'create new' status of the element.voidsetElementView(CmsUUID elementView) Sets the element view.voidsetHasEditHandler(boolean hasEditHandler) Sets the if an edit handler is configured for the given resource type.voidsetHasSettings(boolean hasSettings) Sets if the element may have settings.voidsetIconClasses(String iconRules) Sets the resource type icon CSS rules.voidsetInheritanceInfo(CmsInheritanceInfo inheritanceInfo) Sets the inheritance info for this element.voidsetLockInfo(CmsElementLockInfo lockInfo) voidsetModelGroupAlwaysReplace(boolean alwaysReplace) Sets if all instances of this element should be replaced within a model group.voidsetModelGroupId(CmsUUID modelGroupId) Sets the model group id.voidsetNew(boolean isNew) Sets the 'new' flag.voidsetNewEditorDisabled(boolean disabled) Disables the new editor for this element.voidsetPermissionInfo(CmsPermissionInfo permissionInfo) Sets the permission info.voidsetReleasedAndNotExpired(boolean releasedAndNotExpired) Sets if the given resource is released and not expired.voidsetResourceType(String resourceType) Sets the element resource type.voidsetReused(boolean reused) Sets the 'reused' status.voidsetSitePath(String sitePath) Sets the site path.voidsetSubTitle(String subTitle) Sets the sub title.voidSets the title.voidsetWasModelGroup(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:
getBigIconClassesin 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_CmsHasIconClassesReturns the small icon CSS classes.- Specified by:
getSmallIconClassesin 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:
trueif an edit handler is configured for the given resource type
-
hasSettings
Returns if the element may have settings.- Parameters:
containerId- the container id- Returns:
trueif the element may have settings
-
hasViewPermission
Returns if the current user has view permissions for the element resource.- Returns:
trueif the current user has view permissions for the element resource
-
hasWritePermission
Returns if the user has write permission.- Returns:
trueif 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:
trueif the given element is of the type group container
-
isInheritContainer
Returns if the given element is of the type inherit container.- Returns:
trueif the given element is of the type inherit container
-
isModelGroup
Returns if the element is a model group.- Returns:
trueif the element is a model group
-
isModelGroupAlwaysReplace
Returns if all instances of this element should be replaced within a model group.- Returns:
trueif 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:
trueif 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:
trueif 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-trueif 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-trueif the element is a model group
-
setNew
Sets the 'new' flag.- Parameters:
isNew-trueon 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-trueif 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
-