Package io.goobi.viewer.managedbeans
Class DisclaimerEditBean
java.lang.Object
io.goobi.viewer.managedbeans.DisclaimerEditBean
- All Implemented Interfaces:
Serializable
JSF backing bean for configuring and editing disclaimer texts in the admin interface.
- Author:
- Florian Alpers
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor using the IDAO from theDataManagerclass.DisclaimerEditBean(IDAO dao) Creates a new testing purposes instance. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fielddisclaimerForEdit.booleanChecks if the banner is active, i.e. should be displayed at all.voidSets theDisclaimer.getRequiresConsentAfter()to the current time.voidsave()save.voidsetDisclaimerActive(boolean active) Activate/deactivate the disclaimer.
-
Constructor Details
-
DisclaimerEditBean
public DisclaimerEditBean()Default constructor using the IDAO from theDataManagerclass. -
DisclaimerEditBean
Creates a new testing purposes instance.- Parameters:
dao- the IDAO implementation to use
-
-
Method Details
-
save
public void save()save.
-
getDisclaimerForEdit
Getter for the field
disclaimerForEdit.- Returns:
- the Disclaimer currently loaded for editing
-
setDisclaimerActive
Activate/deactivate the disclaimer. Applies directly to the persisted object.- Parameters:
active- a boolean- Throws:
DAOException
-
isDisclaimerActive
public boolean isDisclaimerActive()Checks if the banner is active, i.e. should be displayed at all.- Returns:
- true if the banner should be shown if appropriate
-
resetUserConsent
Sets theDisclaimer.getRequiresConsentAfter()to the current time.Applies directly to the persisted object.
- Throws:
DAOException
-