Package io.goobi.viewer.managedbeans
Class TermsOfUseEditBean
java.lang.Object
io.goobi.viewer.managedbeans.TermsOfUseEditBean
- All Implemented Interfaces:
IPolyglott,Serializable
@Named("termsOfUseEditBean")
@ViewScoped
public class TermsOfUseEditBean
extends Object
implements Serializable, IPolyglott
Used to edit terms of use in admin backend. Creates a local copy of the global terms of use object and overwrites the global object on save
- Author:
- Florian Alpers
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTitle()voidinit()booleanbooleanisComplete(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.booleanOnly meaningful for the default language for which all required fields must be filled.voidvoidsave()voidsetActivated(boolean active) voidsetDescription(String value) voidsetSelectedLocale(Locale locale) Sets the locale to use for display and editing.voidMethods 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
-
TermsOfUseEditBean
public TermsOfUseEditBean()
-
-
Method Details
-
init
-
getTitle
-
setTitle
-
getDescription
-
setDescription
-
setActivated
public void setActivated(boolean active) -
isActivated
public boolean isActivated() -
setSelectedLocale
Description copied from interface:IPolyglottSets the locale to use for display and editing.- Specified by:
setSelectedLocalein interfaceIPolyglott- Parameters:
locale- the locale to select
-
getSelectedLocale
- Specified by:
getSelectedLocalein interfaceIPolyglott- Returns:
- the locale currently set by
IPolyglott.setSelectedLocale(Locale)
-
getSelectedLanguage
-
save
public void save() -
resetUserAcceptance
- Throws:
DAOException
-
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- 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
-
isValid
Description copied from interface:IPolyglottOnly meaningful for the default language for which all required fields must be filled.- Specified by:
isValidin interfaceIPolyglott- Parameters:
locale- the locale to validate required fields for- Returns:
- true if all required fields contain a value in the given locale
-
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- Parameters:
locale- the locale to check for empty fields- Returns:
- true if no fields are filled for the given locale
-