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 aZoneItemas well as a FO SearchModel created on the fly by the webmaster.
-
-
Field Summary
Fields Modifier and Type Field Description private Collection<AdditionalSearchServiceParameter>_additionalParametersprivate AdditionalParameterValueMap_additionalParameterValuesprivate boolean_computeCriteriaCountsprivate Collection<SearchContext>_contextsprivate AbstractTreeNode<FOSearchCriterion>_criterionTreeprivate Collection<FacetDefinition>_facetsprivate boolean_handleRssprivate String_idprivate List<Pair<SortDefinition,Sort.Order>>_initialSortsprivate Link_linkprivate Integer_maxResultsprivate Collection<SortDefinition>_proposedSortsprivate ResultDisplay_resultDisplayprivate Integer_resultsPerPageprivate List<Returnable>_returnablesprivate RightCheckingMode_rightCheckingModeprivate boolean_saveUserPrefsprivate Collection<Searchable>_searchablesprivate String_titleprivate 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-trueif 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-trueif it handles RSSsaveUserPrefs-trueif it saves the search parameters in the user preferences
-
-
Method Detail
-
getReturnables
public List<Returnable> getReturnables()
Gets theReturnables- Returns:
- the
Returnables
-
getSearchables
public Collection<Searchable> getSearchables()
Gets theSearchables- Returns:
- the
Searchables
-
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 theSearchContexts- Returns:
- the
SearchContexts
-
getCriterionTree
public Optional<AbstractTreeNode<FOSearchCriterion>> getCriterionTree()
Gets thetreeofFOSearchCriteria- Returns:
- the
treeofFOSearchCriteria
-
computeCriteriaCounts
public boolean computeCriteriaCounts()
Returnstrueif the counts of enumerated criteria must be computed- Returns:
trueif the counts of enumerated criteria must be computed
-
getFacets
public Collection<FacetDefinition> getFacets()
Gets theFacetDefinitions- Returns:
- the
FacetDefinitions
-
getInitialSorts
public List<Pair<SortDefinition,Sort.Order>> getInitialSorts()
Gets the initialSortDefinitions with their sort order- Returns:
- the initial
SortDefinitions with their sort order
-
getProposedSorts
public Collection<SortDefinition> getProposedSorts()
Gets the proposedSortDefinitions- Returns:
- the proposed
SortDefinitions
-
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()
Returnstrueif it handles RSS- Returns:
trueif it handles RSS
-
saveUserPrefs
public boolean saveUserPrefs()
Returnstrueif it saves the search parameters in the user preferences- Returns:
trueif it saves the search parameters in the user preferences
-
-