Class SaxFormSearchComponent
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.frontoffice.search.requesttime.impl.SaxFormSearchComponent
- All Implemented Interfaces:
 LogEnabled,SearchComponent,Serviceable
- Direct Known Subclasses:
 CalendarSaxFormSearchComponent
public class SaxFormSearchComponent
extends AbstractLogEnabled
implements SearchComponent, Serviceable
SearchComponent for saxing form- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentHelperThe content helperprotected AmetysObjectResolverThe Ametys object resolverFields inherited from interface org.ametys.web.frontoffice.search.requesttime.SearchComponent
DISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidExecutes the component.protected booleanisMinimalFormSax(Parameters parameters) Returnstrueif the Generator is parameterized with a minimal form saxintpriority()Get the priority of the component.protected voidsaxEnumeratorEntries(ContentHandler contentHandler, FOSearchCriterion criterion, Map<String, Object> contextualParameters, boolean computeCriteriaCounts) SAXEnumeratorentriesprotected voidsaxEnumeratorEntry(ContentHandler contentHandler, SearchCriterionDefinition criterionDef, Map.Entry<Object, I18nizableText> enumeratorEntry) SAXEnumeratorentryprotected voidsaxFacet(ContentHandler contentHandler, I18nizableText facetLabel, String value, Integer count, List<String> selectedFacets) SAX the facetprotected voidsaxFacets(ContentHandler contentHandler, Parameters parameters, Collection<FacetDefinition> facets, Map<String, List<String>> userFacets, Optional<SearchResults<AmetysObject>> searchResults, Map<String, Object> contextualParameters) SAX the facetsprotected voidsaxFormFields(ContentHandler contentHandler, Parameters parameters, List<FOSearchCriterion> nonStaticCriteria, Map<String, Object> contextualParameters, boolean computeCriteriaCounts) SAX the form search criteriaprotected voidsaxFormSingleValue(ContentHandler contentHandler, Attributes attrs, Object singleUserCriterion) SAX a single value of a form search criterionprotected voidsaxFormValue(ContentHandler contentHandler, Attributes attrs, Object userCriterion) SAX the values of a form search criterionprotected voidsaxFormValues(ContentHandler contentHandler, Parameters parameters, List<FOSearchCriterion> nonStaticCriteria, Map<String, Object> userCriteria) SAX the form search criteria valuesprotected voidsaxSorts(ContentHandler contentHandler, Parameters parameters, List<Pair<SortDefinition, Sort.Order>> initialSorts, Collection<SortDefinition> sortsToPropose, List<Pair<String, Sort.Order>> userSorts) SAX the sortsvoidservice(ServiceManager manager) booleanReturnstrueif the component must beexecuted.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger 
- 
Field Details
- 
_resolver
The Ametys object resolver - 
_contentHelper
The content helper 
 - 
 - 
Constructor Details
- 
SaxFormSearchComponent
public SaxFormSearchComponent() 
 - 
 - 
Method Details
- 
service
- Specified by:
 servicein interfaceServiceable- Throws:
 ServiceException
 - 
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
Description copied from interface:SearchComponentReturnstrueif the component must beexecuted.- Specified by:
 supportsin interfaceSearchComponent- Parameters:
 args- the arguments- Returns:
 trueif the component must beexecuted.
 - 
execute
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
 - 
isMinimalFormSax
Returnstrueif the Generator is parameterized with a minimal form sax- Parameters:
 parameters- the parameters- Returns:
 trueif the Generator is parameterized with a minimal form sax
 - 
saxFormFields
protected void saxFormFields(ContentHandler contentHandler, Parameters parameters, List<FOSearchCriterion> nonStaticCriteria, Map<String, Object> contextualParameters, boolean computeCriteriaCounts) throws ExceptionSAX the form search criteria - 
saxEnumeratorEntries
protected void saxEnumeratorEntries(ContentHandler contentHandler, FOSearchCriterion criterion, Map<String, Object> contextualParameters, boolean computeCriteriaCounts) throws ExceptionSAXEnumeratorentries - 
saxEnumeratorEntry
protected void saxEnumeratorEntry(ContentHandler contentHandler, SearchCriterionDefinition criterionDef, Map.Entry<Object, I18nizableText> enumeratorEntry) throws ExceptionSAXEnumeratorentry- Parameters:
 contentHandler- the content handlercriterionDef- the search criterionenumeratorEntry- the enumerator entry- Throws:
 Exception- if an exception occurs
 - 
saxFormValues
protected void saxFormValues(ContentHandler contentHandler, Parameters parameters, List<FOSearchCriterion> nonStaticCriteria, Map<String, Object> userCriteria) throws SAXExceptionSAX the form search criteria values- Parameters:
 contentHandler- the content handlerparameters- the parametersnonStaticCriteria- the non-staticcriteriauserCriteria- The user input criteria- Throws:
 SAXException- if an error occurs while SAXing
 - 
saxFormValue
protected void saxFormValue(ContentHandler contentHandler, Attributes attrs, Object userCriterion) throws SAXException SAX the values of a form search criterion- Parameters:
 contentHandler- the content handlerattrs- The XML attributesuserCriterion- The user input criterion value (is a List if multiple)- Throws:
 SAXException- if an error occurs while SAXing
 - 
saxFormSingleValue
protected void saxFormSingleValue(ContentHandler contentHandler, Attributes attrs, Object singleUserCriterion) throws SAXException SAX a single value of a form search criterion- Parameters:
 contentHandler- the content handlerattrs- The XML attributessingleUserCriterion- The user input criterion single value- Throws:
 SAXException- if an error occurs while SAXing
 - 
saxFacets
protected void saxFacets(ContentHandler contentHandler, Parameters parameters, Collection<FacetDefinition> facets, Map<String, List<String>> userFacets, Optional<SearchResults<AmetysObject>> searchResults, Map<String, throws SAXExceptionObject> contextualParameters) SAX the facets- Parameters:
 contentHandler- the content handlerparameters- the parametersfacets- The facetsuserFacets- The user input facetssearchResults- The search resultscontextualParameters- The contextual parameters- Throws:
 SAXException- if an error occurs while SAXing
 - 
saxFacet
protected void saxFacet(ContentHandler contentHandler, I18nizableText facetLabel, String value, Integer count, List<String> selectedFacets) throws SAXException SAX the facet- Parameters:
 contentHandler- the content handlerfacetLabel- the facet labelvalue- the value for the current facet itemcount- the value countselectedFacets- the facets selected by the user- Throws:
 SAXException- if an error occurs while generating SAX events
 - 
saxSorts
protected void saxSorts(ContentHandler contentHandler, Parameters parameters, List<Pair<SortDefinition, Sort.Order>> initialSorts, Collection<SortDefinition> sortsToPropose, List<Pair<String, throws SAXExceptionSort.Order>> userSorts) SAX the sorts- Parameters:
 contentHandler- the content handlerparameters- the parametersinitialSorts- The initial sortssortsToPropose- The sorts to proposeuserSorts- The user input sorts- Throws:
 SAXException- if an error occurs while SAXing
 
 -