Class MaintenanceMode
java.lang.Object
io.goobi.viewer.model.administration.MaintenanceMode
- All Implemented Interfaces:
IPolyglott
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
getText()
int
hashCode()
boolean
isComplete
(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 trueboolean
If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classboolean
boolean
Only meaningful for the default language for which all required fields must be filledvoid
setEnabled
(boolean enabled) void
void
setSelectedLocale
(Locale locale) Set the locale to use for display and editingvoid
setText.void
void
setTranslations
(List<MaintenanceModeTranslation> translations) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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
-
setText
setText.
- Parameters:
text
- aString
object.
-
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:
isComplete
in 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:
isValid
in 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:
isEmpty
in interfaceIPolyglott
- Parameters:
locale
-- Returns:
- true if no fields are filled for the given locale
-
getSelectedLocale
- Specified by:
getSelectedLocale
in interfaceIPolyglott
- Returns:
- the locale currently set by
IPolyglott.setSelectedLocale(Locale)
-
setSelectedLocale
Description copied from interface:IPolyglott
Set the locale to use for display and editing- Specified by:
setSelectedLocale
in interfaceIPolyglott
- Parameters:
locale
-
-