Class DisclaimerEditBean

java.lang.Object
io.goobi.viewer.managedbeans.DisclaimerEditBean
All Implemented Interfaces:
Serializable

@Named @ViewScoped public class DisclaimerEditBean extends Object implements Serializable
Bean for editing the disclaimer. ViewScoped, so all settings are discarded when loading a new view
Author:
florian
See Also:
  • Constructor Details

    • DisclaimerEditBean

      public DisclaimerEditBean()
      Default constructor using the IDAO from the DataManager class
    • DisclaimerEditBean

      public DisclaimerEditBean(IDAO dao)
      Constructor for testing purposes
      Parameters:
      dao - the IDAO implementation to use
  • Method Details

    • save

      public void save()
    • getDisclaimerForEdit

      public Disclaimer getDisclaimerForEdit()
    • setDisclaimerActive

      public void setDisclaimerActive(boolean active) throws DAOException
      Activate/deactivate the disclaimer. Applies directly to the persisted object
      Parameters:
      active -
      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

      public void resetUserConsent() throws DAOException
      Set the Disclaimer.getRequiresConsentAfter() to the current time. Applies directly to the persisted object
      Throws:
      DAOException