Class SaxEnumeratedCriteriaComponent
- java.lang.Object
-
- org.ametys.web.frontoffice.search.requesttime.impl.SaxEnumeratedCriteriaComponent
-
- All Implemented Interfaces:
SearchComponent,Serviceable
public class SaxEnumeratedCriteriaComponent extends Object implements SearchComponent, Serviceable
SearchComponentfor saxing number of results for each values of enumerated criteria
-
-
Field Summary
Fields Modifier and Type Field Description protected RightManager_rightManagerThe right managerprotected SearchComponentHelper_searchComponentHelperThe helper for search componentprotected SearcherFactory_searcherFactoryThe searcher factory-
Fields inherited from interface org.ametys.web.frontoffice.search.requesttime.SearchComponent
DISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description SaxEnumeratedCriteriaComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_saxCountEnumeratedCriteria(ContentHandler contentHandler, Parameters parameters, Collection<FacetDefinition> facets, SearchResults<AmetysObject> searchResults, String currentLang)SAX the enumerated criteriaprotected void_setRight(SearcherFactory.Searcher searcher, SearchComponentArguments args)Set right to the searchervoidexecute(SearchComponentArguments args)Executes the component.intpriority()Get the priority of the component.voidservice(ServiceManager manager)booleansupports(SearchComponentArguments args)Returnstrueif the component must beexecuted.
-
-
-
Field Detail
-
_searcherFactory
protected SearcherFactory _searcherFactory
The searcher factory
-
_searchComponentHelper
protected SearchComponentHelper _searchComponentHelper
The helper for search component
-
_rightManager
protected RightManager _rightManager
The right manager
-
-
Constructor Detail
-
SaxEnumeratedCriteriaComponent
public SaxEnumeratedCriteriaComponent()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
priority
public int priority()
Description copied from interface:SearchComponentGet the priority of the component. The lowest one will be executed first, and so on.- Specified by:
priorityin interfaceSearchComponent- Returns:
- the priority of the component
-
supports
public boolean supports(SearchComponentArguments args)
Description copied from interface:SearchComponentReturnstrueif the component must beexecuted.- Specified by:
supportsin interfaceSearchComponent- Parameters:
args- the arguments- Returns:
trueif the component must beexecuted.
-
execute
public void execute(SearchComponentArguments args) throws Exception
Description copied from interface:SearchComponentExecutes the component.- Specified by:
executein interfaceSearchComponent- Parameters:
args- the arguments- Throws:
Exception- if an exception occurs. Other search components will be attempted to be executed
-
_setRight
protected void _setRight(SearcherFactory.Searcher searcher, SearchComponentArguments args)
Set right to the searcher- Parameters:
searcher- the searcherargs- the arguments
-
_saxCountEnumeratedCriteria
protected void _saxCountEnumeratedCriteria(ContentHandler contentHandler, Parameters parameters, Collection<FacetDefinition> facets, SearchResults<AmetysObject> searchResults, String currentLang) throws SAXException
SAX the enumerated criteria- Parameters:
contentHandler- the content handlerparameters- the parametersfacets- The facetssearchResults- The search resultscurrentLang- The current language- Throws:
SAXException- if an error occurs while SAXing
-
-