Class HtmlSidebarWidget
java.lang.Object
io.goobi.viewer.model.cms.widgets.CustomSidebarWidget
io.goobi.viewer.model.cms.widgets.HtmlSidebarWidget
- All Implemented Interfaces:
IPolyglott,Serializable
A subtype of
CustomSidebarWidget to display a html text in different languages.- Author:
- Florian Alpers
- See Also:
-
Field Summary
Fields inherited from class io.goobi.viewer.model.cms.widgets.CustomSidebarWidget
id -
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructor.Cloning constructor. -
Method Summary
Modifier and TypeMethodDescriptionde.intranda.metadata.multilanguage.IMetadataValuegetShortDescription(int maxLength) getType()Return the type of this custom sidebar widget.booleanisComplete(Locale locale) If this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)also returns true.booleanIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class.booleanvoidsetSelectedLocale(Locale locale) Sets the locale to use for display and editing.Methods inherited from class io.goobi.viewer.model.cms.widgets.CustomSidebarWidget
clone, getAdminBackendUrl, getDescription, getId, getSelectedLocale, getStyleClass, getTitle, isCollapsed, isValid, setCollapsed, setId, setStyleClass, setTitleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.goobi.viewer.model.translations.IPolyglott
getLocales, isDefaultLocaleSelected, isSelected, setSelectedLocale
-
Constructor Details
-
HtmlSidebarWidget
public HtmlSidebarWidget()Empty default constructor. -
HtmlSidebarWidget
Cloning constructor.- Parameters:
o- widget instance to clone
-
-
Method Details
-
getHtmlText
- Returns:
- the html text
-
isComplete
Description copied from interface:IPolyglottIf this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)also returns true.- Specified by:
isCompletein interfaceIPolyglott- Overrides:
isCompletein classCustomSidebarWidget- Parameters:
locale- the locale to check translation completeness for- Returns:
- true if
IPolyglott.isValid(Locale)returns true for the given locale and all fields contain a value which have a value in the default locale. For the default locale,IPolyglott.isComplete(Locale)andIPolyglott.isValid(Locale)are identical. For implementations with only one field, both methods are also always identical
-
isEmpty
Description copied from interface:IPolyglottIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class.- Specified by:
isEmptyin interfaceIPolyglott- Overrides:
isEmptyin classCustomSidebarWidget- Parameters:
locale- the locale to check for empty fields- Returns:
- true if no fields are filled for the given locale
-
setSelectedLocale
Description copied from interface:IPolyglottSets the locale to use for display and editing.- Specified by:
setSelectedLocalein interfaceIPolyglott- Overrides:
setSelectedLocalein classCustomSidebarWidget- Parameters:
locale- the locale to select
-
getType
Description copied from class:CustomSidebarWidgetReturn the type of this custom sidebar widget. Must be implemented by subclasses ofCustomSidebarWidget- Overrides:
getTypein classCustomSidebarWidget- Returns:
CustomWidgetType
-
isHasShortDescription
public boolean isHasShortDescription()- Overrides:
isHasShortDescriptionin classCustomSidebarWidget
-
getShortDescription
public de.intranda.metadata.multilanguage.IMetadataValue getShortDescription(int maxLength) - Overrides:
getShortDescriptionin classCustomSidebarWidget
-