Class DisplayScope
java.lang.Object
io.goobi.viewer.model.administration.legal.DisplayScope
- All Implemented Interfaces:
Serializable
Describes the locations in the viewer where a notification should be displayed. This can either be all pages or all record pages which may be
further restricted by a SOLR query condition
- Author:
- florian
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The type of viewer-pages that are in scope -
Constructor Summary
ConstructorDescriptionCreates a scope that appplies to all viewer pagesDisplayScope
(DisplayScope.PageScope scope, String filter) Creates a scope from a given PageScope and filterQuery.DisplayScope
(String jsonString) -
Method Summary
Modifier and TypeMethodDescriptionboolean
appliesToPage
(PageType pageType, String pi, SolrSearchIndex searchIndex) Get the query to use in a SOLR search to deterimine whether a record should show the disclaimervoid
setFilterQuery
(String filterQuery) void
setPageScope
(DisplayScope.PageScope pageScope)
-
Constructor Details
-
DisplayScope
public DisplayScope()Creates a scope that appplies to all viewer pages -
DisplayScope
Creates a scope from a given PageScope and filterQuery. The filterQuery is only meaningful if the scope is PageScope.RECORD- Parameters:
scope
-filter
-
-
DisplayScope
- Throws:
IllegalArgumentException
-
-
Method Details
-
getPageScope
- Returns:
- the pageScope
-
setPageScope
- Parameters:
pageScope
- the pageScope to set
-
getFilterQuery
- Returns:
- the filterQuery
-
setFilterQuery
- Parameters:
filterQuery
- the filterQuery to set
-
appliesToPage
public boolean appliesToPage(PageType pageType, String pi, SolrSearchIndex searchIndex) throws PresentationException, IndexUnreachableException -
getQueryForSearch
Get the query to use in a SOLR search to deterimine whether a record should show the disclaimer- Returns:
- a solr search query for the disclaimer
-
getAsJson
-