Class CMSSidebarElement

java.lang.Object
io.goobi.viewer.model.cms.widgets.embed.CMSSidebarElement
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CMSSidebarElementAutomatic, CMSSidebarElementCustom, CMSSidebarElementDefault

@Entity public class CMSSidebarElement extends Object implements Serializable
Represents a sidebar widget embedded in a CMS page with its configuration and position.

Wrapper to link sidebar widgets to cms-pages. Has a subclass for each type of sidebar widget

See Also:
  • Field Details

  • Constructor Details

    • CMSSidebarElement

      public CMSSidebarElement()
      Empty constructor for the DAO.
    • CMSSidebarElement

      public CMSSidebarElement(WidgetContentType type)
      Default constructor for a certain type of widget.
      Parameters:
      type - the content type determining the widget's behaviour and rendering
    • CMSSidebarElement

      public CMSSidebarElement(WidgetContentType type, CMSPage owner)
      Default constructor for a certain type of widget.
      Parameters:
      type - the content type determining the widget's behaviour and rendering
      owner - the CMS page that owns this sidebar element
    • CMSSidebarElement

      public CMSSidebarElement(WidgetContentType type, CMSPageTemplate owner)
      Default constructor for a certain type of widget.
      Parameters:
      type - the content type determining the widget's behaviour and rendering
      owner - the CMS page template that owns this sidebar element
    • CMSSidebarElement

      public CMSSidebarElement(CMSSidebarElement orig, CMSPage owner)
      Default constructor for a certain type of widget and owning CMSPage.
      Parameters:
      orig - the sidebar element to copy
      owner - the CMS page that will own the copied element
    • CMSSidebarElement

      public CMSSidebarElement(CMSSidebarElement orig, CMSPageTemplate owner)
      Default constructor for a certain type of widget and owning CMSPageTemplate.
      Parameters:
      orig - the sidebar element to copy
      owner - the CMS page template that will own the copied element
  • Method Details

    • copy

      public static CMSSidebarElement copy(CMSSidebarElement orig, CMSPage owner)
      Clones the given sidebar element and assigns the given CMSPage as owner. Depends on cloning constructors of subclasses
      Parameters:
      orig - the sidebar element to copy
      owner - the CMS page that will own the copied element
      Returns:
      CMSSidebarElement
    • copy

      public static CMSSidebarElement copy(CMSSidebarElement orig, CMSPageTemplate owner)
      Clones the given sidebar element and assigns the given CMSPage as owner. Depends on cloning constructors of subclasses
      Parameters:
      orig - the sidebar element to copy
      owner - the CMS page template that will own the copied element
      Returns:
      CMSSidebarElement
    • getId

      public Long getId()
      The database id.
      Returns:
      the database primary key of this sidebar element
    • setId

      public void setId(Long id)
    • getOwnerPage

      public CMSPage getOwnerPage()
      The CMSPage containing the element.
      Returns:
      the CMSPage that owns this sidebar element
    • setOwnerPage

      public void setOwnerPage(CMSPage ownerPage)
    • getOwnerTemplate

      public CMSPageTemplate getOwnerTemplate()
    • setOwnerTemplate

      public void setOwnerTemplate(CMSPageTemplate ownerTemplate)
    • getOrder

      public int getOrder()
      The order in which the element is shown. Low numbers are displayed on top of the sidebar, high numbers at the bottom
      Returns:
      the display order of this element within the sidebar
    • setOrder

      public void setOrder(int order)
    • getGenerationType

      public WidgetGenerationType getGenerationType()
      The WidgetGenerationType of the underlying widget.
      Returns:
      the WidgetGenerationType describing how this widget's data is generated
    • setGenerationType

      public void setGenerationType(WidgetGenerationType generationType)
    • getContentType

      public WidgetContentType getContentType()
      The WidgetContentType of the underlying widget.
      Returns:
      the WidgetContentType identifying the xhtml component used for this sidebar element
    • setContentType

      public void setContentType(WidgetContentType contentType)
    • getTitle

      public TranslatedText getTitle()
      The title displayed for this element when editing the owning CMSPage.
      Returns:
      TranslatedText
    • getDescription

      public TranslatedText getDescription()
    • canEdit

      public boolean canEdit()
    • getAdminBackendUrl

      public String getAdminBackendUrl()