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 Alpers
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe type of viewer-pages that are in scope. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a scope that appplies to all viewer pages.DisplayScope(DisplayScope.PageScope scope, String filter) Creates a scope from a given PageScope and filterQuery.DisplayScope(String jsonString) -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesToPage(PageType pageType, String pi, SolrSearchIndex searchIndex) Gets the query to use in a SOLR search to determine whether a record should show the disclaimer.voidsetFilterQuery(String filterQuery) voidsetPageScope(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- page scope defining where the display appliesfilter- Solr filter query restricting the scope to specific records
-
DisplayScope
- Throws:
IllegalArgumentException
-
-
Method Details
-
getPageScope
-
setPageScope
-
getFilterQuery
-
setFilterQuery
-
appliesToPage
public boolean appliesToPage(PageType pageType, String pi, SolrSearchIndex searchIndex) throws PresentationException, IndexUnreachableException -
getQueryForSearch
Gets the query to use in a SOLR search to determine whether a record should show the disclaimer.- Returns:
- a solr search query for the disclaimer
-
getAsJson
-