Class CMSSidebarElement
java.lang.Object
io.goobi.viewer.model.cms.widgets.embed.CMSSidebarElement
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CMSSidebarElementAutomatic,CMSSidebarElementCustom,CMSSidebarElementDefault
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for the DAO.CMSSidebarElement(CMSSidebarElement orig, CMSPage owner) Default constructor for a certain type of widget and owning CMSPage.CMSSidebarElement(CMSSidebarElement orig, CMSPageTemplate owner) Default constructor for a certain type of widget and owning CMSPageTemplate.Default constructor for a certain type of widget.CMSSidebarElement(WidgetContentType type, CMSPage owner) Default constructor for a certain type of widget.CMSSidebarElement(WidgetContentType type, CMSPageTemplate owner) Default constructor for a certain type of widget. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanEdit()static CMSSidebarElementcopy(CMSSidebarElement orig, CMSPage owner) Clones the given sidebar element and assigns the given CMSPage as owner.static CMSSidebarElementcopy(CMSSidebarElement orig, CMSPageTemplate owner) Clones the given sidebar element and assigns the given CMSPage as owner.TheWidgetContentTypeof the underlying widget.TheWidgetGenerationTypeof the underlying widget.getId()The database id.intgetOrder()The order in which the element is shown.TheCMSPagecontaining the element.getTitle()The title displayed for this element when editing the owning CMSPage.voidsetContentType(WidgetContentType contentType) voidsetGenerationType(WidgetGenerationType generationType) voidvoidsetOrder(int order) voidsetOwnerPage(CMSPage ownerPage) voidsetOwnerTemplate(CMSPageTemplate ownerTemplate)
-
Field Details
-
WIDGET_TYPE_DEFAULT
- See Also:
-
WIDGET_TYPE_AUTOMATIC
- See Also:
-
WIDGET_TYPE_CUSTOM
- See Also:
-
HASH_MULTIPLIER
protected static final int HASH_MULTIPLIERConstantHASH_MULTIPLIER=11.- See Also:
-
-
Constructor Details
-
CMSSidebarElement
public CMSSidebarElement()Empty constructor for the DAO. -
CMSSidebarElement
Default constructor for a certain type of widget.- Parameters:
type- the content type determining the widget's behaviour and rendering
-
CMSSidebarElement
Default constructor for a certain type of widget.- Parameters:
type- the content type determining the widget's behaviour and renderingowner- the CMS page that owns this sidebar element
-
CMSSidebarElement
Default constructor for a certain type of widget.- Parameters:
type- the content type determining the widget's behaviour and renderingowner- the CMS page template that owns this sidebar element
-
CMSSidebarElement
Default constructor for a certain type of widget and owning CMSPage.- Parameters:
orig- the sidebar element to copyowner- the CMS page that will own the copied element
-
CMSSidebarElement
Default constructor for a certain type of widget and owning CMSPageTemplate.- Parameters:
orig- the sidebar element to copyowner- the CMS page template that will own the copied element
-
-
Method Details
-
copy
Clones the given sidebar element and assigns the given CMSPage as owner. Depends on cloning constructors of subclasses- Parameters:
orig- the sidebar element to copyowner- the CMS page that will own the copied element- Returns:
CMSSidebarElement
-
copy
Clones the given sidebar element and assigns the given CMSPage as owner. Depends on cloning constructors of subclasses- Parameters:
orig- the sidebar element to copyowner- the CMS page template that will own the copied element- Returns:
CMSSidebarElement
-
getId
The database id.- Returns:
- the database primary key of this sidebar element
-
setId
-
getOwnerPage
TheCMSPagecontaining the element.- Returns:
- the
CMSPagethat owns this sidebar element
-
setOwnerPage
-
getOwnerTemplate
-
setOwnerTemplate
-
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
TheWidgetGenerationTypeof the underlying widget.- Returns:
- the
WidgetGenerationTypedescribing how this widget's data is generated
-
setGenerationType
-
getContentType
TheWidgetContentTypeof the underlying widget.- Returns:
- the
WidgetContentTypeidentifying the xhtml component used for this sidebar element
-
setContentType
-
getTitle
The title displayed for this element when editing the owning CMSPage.- Returns:
TranslatedText
-
getDescription
-
canEdit
public boolean canEdit() -
getAdminBackendUrl
-