Class Disclaimer
java.lang.Object
io.goobi.viewer.model.administration.legal.Disclaimer
Class to persist settings for the disclaimer modal. Only one instance of this class should be persisted in the database
- Author:
- Florian Alpers
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet theacceptanceScopeof the disclaimer.getId()Database id.Get the date after which acceptance of the disclaimer must have happened to be valid.getText()The text to show in the disclaimer.booleanisActive()Get if the disclaimer is active.voidsetAcceptanceScope(ConsentScope acceptanceScope) Set theacceptanceScopeof the disclaimer.voidsetActive(boolean active) Set the disclaimer to active/inactive state.voidsetDisplayScope(DisplayScope displayScope) voidSet the database id.voidsetRequiresConsentAfter(LocalDateTime requiresConsentAfter) Set the date after which acceptance of the disclaimer must have happened to be valid.voidsetText(TranslatedText text) Set the disclaimer text.
-
Field Details
-
id
Unique database ID.
-
-
Constructor Details
-
Disclaimer
public Disclaimer()Empty default constructor. -
Disclaimer
Cloning constructor.- Parameters:
orig- disclaimer instance to clone
-
-
Method Details
-
getId
Database id.- Returns:
- the database primary key of this disclaimer
-
setId
Set the database id.- Parameters:
id- the database primary key of this disclaimer
-
getText
The text to show in the disclaimer.- Returns:
- the translated text displayed in the disclaimer
-
setText
Set the disclaimer text.- Parameters:
text- the translated text to display in the disclaimer
-
isActive
public boolean isActive()Get if the disclaimer is active.- Returns:
- true if the disclaimer is to be shown at all
-
setActive
public void setActive(boolean active) Set the disclaimer to active/inactive state.- Parameters:
active- true to enable display of the disclaimer, false to hide it
-
getRequiresConsentAfter
Get the date after which acceptance of the disclaimer must have happened to be valid.- Returns:
- a date
-
setRequiresConsentAfter
Set the date after which acceptance of the disclaimer must have happened to be valid.- Parameters:
requiresConsentAfter- the cutoff date; prior acceptances are no longer considered valid
-
getDisplayScope
-
setDisplayScope
-
getAcceptanceScope
Get theacceptanceScopeof the disclaimer.- Returns:
- the
ConsentScope
-
setAcceptanceScope
Set theacceptanceScopeof the disclaimer.- Parameters:
acceptanceScope- aConsentScope
-