Class SearchServiceInstance
- java.lang.Object
-
- org.ametys.web.frontoffice.search.instance.SearchServiceInstance
-
public class SearchServiceInstance extends Object
A wrapper class representing an instance ofSearchService
.
It can be seen as aZoneItem
as well as a FO SearchModel created on the fly by the webmaster.
-
-
Field Summary
Fields Modifier and Type Field Description private Collection<AdditionalSearchServiceParameter>
_additionalParameters
private AdditionalParameterValueMap
_additionalParameterValues
private boolean
_computeCriteriaCounts
private Collection<SearchContext>
_contexts
private AbstractTreeNode<FOSearchCriterion>
_criterionTree
private Collection<FacetDefinition>
_facets
private boolean
_handleRss
private String
_id
private List<Pair<SortDefinition,Sort.Order>>
_initialSorts
private Link
_link
private Integer
_maxResults
private Collection<SortDefinition>
_proposedSorts
private ResultDisplay
_resultDisplay
private Integer
_resultsPerPage
private List<Returnable>
_returnables
private RightCheckingMode
_rightCheckingMode
private boolean
_saveUserPrefs
private Collection<Searchable>
_searchables
private String
_title
private String
_xslt
-
Constructor Summary
Constructors Constructor Description SearchServiceInstance(String id, String title, List<Returnable> returnables, Collection<Searchable> searchables, Collection<AdditionalSearchServiceParameter> additionalParameters, AdditionalParameterValueMap additionalParameterValues, Collection<SearchContext> contexts, AbstractTreeNode<FOSearchCriterion> criterionTree, boolean computeCriteriaCounts, Collection<FacetDefinition> facets, List<Pair<SortDefinition,Sort.Order>> initialSorts, Collection<SortDefinition> proposedSorts, Integer resultsPerPage, Integer maxResults, RightCheckingMode rightCheckingMode, String xslt, ResultDisplay resultDisplay, Link link, boolean handleRss, boolean saveUserPrefs)
Creates an instance of search service
-
Method Summary
-
-
-
Field Detail
-
_returnables
private List<Returnable> _returnables
-
_searchables
private Collection<Searchable> _searchables
-
_additionalParameters
private Collection<AdditionalSearchServiceParameter> _additionalParameters
-
_additionalParameterValues
private AdditionalParameterValueMap _additionalParameterValues
-
_contexts
private Collection<SearchContext> _contexts
-
_criterionTree
private AbstractTreeNode<FOSearchCriterion> _criterionTree
-
_computeCriteriaCounts
private boolean _computeCriteriaCounts
-
_facets
private Collection<FacetDefinition> _facets
-
_initialSorts
private List<Pair<SortDefinition,Sort.Order>> _initialSorts
-
_proposedSorts
private Collection<SortDefinition> _proposedSorts
-
_resultsPerPage
private Integer _resultsPerPage
-
_maxResults
private Integer _maxResults
-
_rightCheckingMode
private RightCheckingMode _rightCheckingMode
-
_resultDisplay
private ResultDisplay _resultDisplay
-
_handleRss
private boolean _handleRss
-
_saveUserPrefs
private boolean _saveUserPrefs
-
-
Constructor Detail
-
SearchServiceInstance
SearchServiceInstance(String id, String title, List<Returnable> returnables, Collection<Searchable> searchables, Collection<AdditionalSearchServiceParameter> additionalParameters, AdditionalParameterValueMap additionalParameterValues, Collection<SearchContext> contexts, AbstractTreeNode<FOSearchCriterion> criterionTree, boolean computeCriteriaCounts, Collection<FacetDefinition> facets, List<Pair<SortDefinition,Sort.Order>> initialSorts, Collection<SortDefinition> proposedSorts, Integer resultsPerPage, Integer maxResults, RightCheckingMode rightCheckingMode, String xslt, ResultDisplay resultDisplay, Link link, boolean handleRss, boolean saveUserPrefs)
Creates an instance of search service- Parameters:
id
- the idtitle
- the titlereturnables
- the returnablessearchables
- the searchablesadditionalParameters
- the additional parametersadditionalParameterValues
- the additional parameter valuescontexts
- the search contextscriterionTree
- the tree of criteria. Can be null if there is no criterion.computeCriteriaCounts
-true
if the counts of enumerated criteria must be computedfacets
- the facetsinitialSorts
- the initial sortsproposedSorts
- the proposed sortsresultsPerPage
- the number of results per page. Can be nullmaxResults
- the maximum number of results. Can be nullrightCheckingMode
- the right checking modexslt
- the XSLTresultDisplay
- the result display objectlink
- the link objecthandleRss
-true
if it handles RSSsaveUserPrefs
-true
if it saves the search parameters in the user preferences
-
-
Method Detail
-
getReturnables
public List<Returnable> getReturnables()
Gets theReturnable
s- Returns:
- the
Returnable
s
-
getSearchables
public Collection<Searchable> getSearchables()
Gets theSearchable
s- Returns:
- the
Searchable
s
-
getAdditionalParameters
public Collection<AdditionalSearchServiceParameter> getAdditionalParameters()
Gets the additional parameters- Returns:
- the additional parameters
-
getAdditionalParameterValues
public AdditionalParameterValueMap getAdditionalParameterValues()
Gets the additional parameter values- Returns:
- the additional parameter values
-
getContexts
public Collection<SearchContext> getContexts()
Gets theSearchContext
s- Returns:
- the
SearchContext
s
-
getCriterionTree
public Optional<AbstractTreeNode<FOSearchCriterion>> getCriterionTree()
Gets thetree
ofFOSearchCriteria
- Returns:
- the
tree
ofFOSearchCriteria
-
computeCriteriaCounts
public boolean computeCriteriaCounts()
Returnstrue
if the counts of enumerated criteria must be computed- Returns:
true
if the counts of enumerated criteria must be computed
-
getFacets
public Collection<FacetDefinition> getFacets()
Gets theFacetDefinition
s- Returns:
- the
FacetDefinition
s
-
getInitialSorts
public List<Pair<SortDefinition,Sort.Order>> getInitialSorts()
Gets the initialSortDefinition
s with their sort order- Returns:
- the initial
SortDefinition
s with their sort order
-
getProposedSorts
public Collection<SortDefinition> getProposedSorts()
Gets the proposedSortDefinition
s- Returns:
- the proposed
SortDefinition
s
-
resultsPerPage
public Optional<Integer> resultsPerPage()
Gets the number of results per page- Returns:
- the number of results per page
-
maxResults
public Optional<Integer> maxResults()
Gets the maximum number of results- Returns:
- the maximum number of results
-
getRightCheckingMode
public RightCheckingMode getRightCheckingMode()
Gets theRightCheckingMode
- Returns:
- the
RightCheckingMode
-
getResultDisplay
public ResultDisplay getResultDisplay()
Gets the result display- Returns:
- the result display
-
handleRss
public boolean handleRss()
Returnstrue
if it handles RSS- Returns:
true
if it handles RSS
-
saveUserPrefs
public boolean saveUserPrefs()
Returnstrue
if it saves the search parameters in the user preferences- Returns:
true
if it saves the search parameters in the user preferences
-
-