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
  • Field Details

  • Constructor Details

  • 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 interface I_CmsHasIconClasses
      Returns:
      the resource type icon CSS rules
    • getClientId

      public String 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

      public String 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 interface I_CmsHasIconClasses
      Returns:
      the small icon CSS classes
      See Also:
    • getSubTitle

      public String getSubTitle()
      Returns the sub title.

      Returns:
      the sub title
    • getTitle

      public 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(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
    • isReused

      public boolean isReused()
      True if the element is marked as reused.
      Returns:
      true if the element is marked as reused
    • isWasModelGroup

      public boolean isWasModelGroup()
      Returns the former copy model status.

      Returns:
      the former copy model status
    • setClientId

      public void setClientId(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(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(String resourceType)
      Sets the element resource type.

      Parameters:
      resourceType - the element resource type
    • setReused

      public void setReused(boolean reused)
      Sets the 'reused' status.
      Parameters:
      reused - the 'reused' status
    • setSitePath

      public void setSitePath(String sitePath)
      Sets the site path.

      Parameters:
      sitePath - the site path to set
    • setSubTitle

      public void setSubTitle(String subTitle)
      Sets the sub title.

      Parameters:
      subTitle - the sub title
    • setTitle

      public void setTitle(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