Package io.goobi.viewer.managedbeans
Class DisclaimerEditBean
java.lang.Object
io.goobi.viewer.managedbeans.DisclaimerEditBean
- All Implemented Interfaces:
Serializable
Bean for editing the disclaimer. ViewScoped, so all settings are discarded when loading a new view.
- Author:
- florian
- See Also:
-
Constructor Summary
ConstructorDescriptionDefault constructor using the IDAO from theDataManager
class.DisclaimerEditBean
(IDAO dao) Constructor for testing purposes. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fielddisclaimerForEdit
.boolean
Check if the banner is active, i.e. should be displayed at all.void
Set theDisclaimer.getRequiresConsentAfter()
to the current time.void
save()
save.void
setDisclaimerActive
(boolean active) Activate/deactivate the disclaimer.
-
Constructor Details
-
DisclaimerEditBean
public DisclaimerEditBean()Default constructor using the IDAO from theDataManager
class. -
DisclaimerEditBean
Constructor for testing purposes.- Parameters:
dao
- the IDAO implementation to use
-
-
Method Details
-
save
public void save()save.
-
getDisclaimerForEdit
Getter for the field
disclaimerForEdit
.- Returns:
- a
Disclaimer
object
-
setDisclaimerActive
Activate/deactivate the disclaimer. Applies directly to the persisted object.- Parameters:
active
- a boolean- Throws:
DAOException
-
isDisclaimerActive
public boolean isDisclaimerActive()Check if the banner is active, i.e. should be displayed at all.- Returns:
- true if the banner should be shown if appropriate
-
resetUserConsent
Set theDisclaimer.getRequiresConsentAfter()
to the current time. Applies directly to the persisted object.- Throws:
DAOException
-