Package io.goobi.viewer.managedbeans
Class DisclaimerBean
- java.lang.Object
-
- io.goobi.viewer.managedbeans.DisclaimerBean
-
- All Implemented Interfaces:
Serializable
@Named @SessionScoped public class DisclaimerBean extends Object implements Serializable
Bean to check whether the disclaimer applies to a page/record as well as provide a configuration json object for the javascript This bean is session scoped, so all stored settings are discarded outside a jsf session- Author:
- florian
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DisclaimerBean()
Default constructor using the IDAO from theDataManager
classDisclaimerBean(IDAO dao, SolrSearchIndex searchIndex)
Constructor for testing purposes
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Disclaimer
getDisclaimer()
Deprecated.not needed if disclaimer is realized as a sweet alert which is created fromgetDisclaimerConfig()
String
getDisclaimerConfig()
The configuration object for the disclaimer to be used by the viewerJS.disclaimerModal module
-
-
-
Constructor Detail
-
DisclaimerBean
public DisclaimerBean()
Default constructor using the IDAO from theDataManager
class
-
DisclaimerBean
public DisclaimerBean(IDAO dao, SolrSearchIndex searchIndex)
Constructor for testing purposes- Parameters:
dao
- the IDAO implementation to use
-
-
Method Detail
-
getDisclaimer
@Deprecated public Disclaimer getDisclaimer()
Deprecated.not needed if disclaimer is realized as a sweet alert which is created fromgetDisclaimerConfig()
Get the stored disclaimer to display on a viewer web-page. Do not use for modifications- Returns:
- the cookie banner stored in the DAO
-
getDisclaimerConfig
public String getDisclaimerConfig()
The configuration object for the disclaimer to be used by the viewerJS.disclaimerModal module- Returns:
- a json object
-
-