Class MaintenanceMode
java.lang.Object
io.goobi.viewer.model.administration.MaintenanceMode
- All Implemented Interfaces:
IPolyglott
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()getText()getTextOrDefault(String language) inthashCode()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 truebooleanIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classbooleanbooleanOnly meaningful for the default language for which all required fields must be filledvoidsetEnabled(boolean enabled) voidvoidsetSelectedLocale(Locale locale) Set the locale to use for display and editingvoidsetText.voidvoidsetTranslations(List<MaintenanceModeTranslation> translations) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.goobi.viewer.model.translations.IPolyglott
getLocales, isDefaultLocaleSelected, isSelected, setSelectedLocale
-
Constructor Details
-
MaintenanceMode
public MaintenanceMode()Default constructor.
-
-
Method Details
-
getId
- Returns:
- the id
-
setId
- Parameters:
id- the id to set
-
isEnabled
public boolean isEnabled()- Returns:
- the enabled
-
setEnabled
public void setEnabled(boolean enabled) - Parameters:
enabled- the enabled to set
-
getTranslations
- Returns:
- the translations
-
setTranslations
- Parameters:
translations- the translations to set
-
getText
- Returns:
- Text value in the current language
-
getText
- Parameters:
language-- Returns:
- Text value in the given language
-
getTextOrDefault
- Parameters:
language-- Returns:
- Text value in the given language
-
setText
setText.
- Parameters:
text- aStringobject.
-
setText
- Parameters:
text-language-
-
hashCode
public int hashCode() -
equals
-
isComplete
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- Specified by:
isCompletein interfaceIPolyglott- Parameters:
locale-- 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
-
isValid
Only meaningful for the default language for which all required fields must be filled- Specified by:
isValidin interfaceIPolyglott- Parameters:
locale-- Returns:
- true if all required fields contain a value in the given locale
-
isEmpty
If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class- Specified by:
isEmptyin interfaceIPolyglott- Parameters:
locale-- Returns:
- true if no fields are filled for the given locale
-
getSelectedLocale
- Specified by:
getSelectedLocalein interfaceIPolyglott- Returns:
- the locale currently set by
IPolyglott.setSelectedLocale(Locale)
-
setSelectedLocale
Description copied from interface:IPolyglottSet the locale to use for display and editing- Specified by:
setSelectedLocalein interfaceIPolyglott- Parameters:
locale-
-