Class CMSContentItem
java.lang.Object
io.goobi.viewer.model.cms.pages.content.CMSContentItem
Wraps a
CMSContent within a CMSPage.- Author:
- Florian Alpers
-
Constructor Summary
ConstructorsConstructorDescriptionCMSContentItem(CMSContentItem orig, CMSComponent owningComponent) CMSContentItem(String itemId, CMSContent content, String label, String description, String htmlGroup, JsfComponent jsfComponent, CMSComponent owningComponent, boolean required) -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwo CMSContentItems are equal if theiritemIds are equal.getLabel()inthashCode()booleanisEmpty()Check if thecontentattribute exists (i.e. database data is present).booleanbooleanbooleanisMedia()booleanbooleanvoidsetUiComponent(UIComponent uiComponent) toString()
-
Constructor Details
-
CMSContentItem
-
CMSContentItem
public CMSContentItem(String itemId, CMSContent content, String label, String description, String htmlGroup, JsfComponent jsfComponent, CMSComponent owningComponent, boolean required) - Parameters:
itemId- unique identifier within the owning componentcontent- the CMS content wrapped by this itemlabel- human-readable label shown in the backenddescription- explanatory text shown in the backendhtmlGroup- optional HTML group name for grouping content itemsjsfComponent- the JSF component used to render this itemowningComponent- the component that contains this content itemrequired- true if this content item must not be empty
-
-
Method Details
-
isRequired
public boolean isRequired() -
getItemId
-
getContent
-
getLabel
-
getItemLabel
-
getDescription
-
getJsfComponent
-
hashCode
public int hashCode() -
isMandatory
public boolean isMandatory() -
equals
Two CMSContentItems are equal if theiritemIds are equal. -
getUiComponent
- Throws:
PresentationException
-
setUiComponent
-
isEmpty
public boolean isEmpty()Check if thecontentattribute exists (i.e. database data is present). If so, and it is textual or media content, also check if text is empty or the media item exists- Returns:
- true if no database entry exists or if it doesn't contain data which can be presented
-
isShortText
public boolean isShortText() -
isHtmlText
public boolean isHtmlText() -
isMedia
public boolean isMedia() -
getHtmlGroup
-
getOwningComponent
-
toString
-