public class SaxFormSearchComponent extends Object implements SearchComponent
SearchComponent for saxing form| Modifier and Type | Field and Description |
|---|---|
private static String |
__IS_MINIMAL_FORM_SAX_PARAMETER_NAME |
DISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY| Constructor and Description |
|---|
SaxFormSearchComponent() |
| Modifier and Type | Method and Description |
|---|---|
private void |
_addAttributesForSelectedSort(AttributesImpl attrs,
Sort.Order direction,
int number) |
private Map<String,Object> |
_contextualParameters(Site currentSite) |
void |
execute(SearchComponentArguments args)
Executes the component.
|
protected boolean |
isMinimalFormSax(Parameters parameters)
Returns
true if the Generator is parameterized with a minimal form sax |
int |
priority()
Get the priority of the component.
|
protected void |
saxEnumeratorEntries(ContentHandler contentHandler,
FOSearchCriterion criterion,
String language,
Site currentSite)
SAX
Enumerator entries |
protected void |
saxEnumeratorEntry(ContentHandler contentHandler,
Map.Entry<Object,I18nizableText> enumeratorEntry)
SAX
Enumerator entry |
protected void |
saxFacets(ContentHandler contentHandler,
Parameters parameters,
Collection<FacetDefinition> facets,
Map<String,List<String>> userFacets,
Optional<SearchResults<AmetysObject>> searchResults,
String currentLang)
SAX the facets
|
protected void |
saxFormFields(ContentHandler contentHandler,
Parameters parameters,
List<FOSearchCriterion> nonStaticCriteria,
String language,
Site currentSite)
SAX the form search criteria
|
protected void |
saxFormSingleValue(ContentHandler contentHandler,
Attributes attrs,
Object singleUserCriterion)
SAX a single value of a form search criterion
|
protected void |
saxFormValue(ContentHandler contentHandler,
Attributes attrs,
Object userCriterion)
SAX the values of a form search criterion
|
protected void |
saxFormValues(ContentHandler contentHandler,
Parameters parameters,
List<FOSearchCriterion> nonStaticCriteria,
Map<String,Object> userCriteria)
SAX the form search criteria values
|
protected void |
saxSorts(ContentHandler contentHandler,
Parameters parameters,
List<Pair<SortDefinition,Sort.Order>> initialSorts,
Collection<SortDefinition> sortsToPropose,
List<Pair<String,Sort.Order>> userSorts)
SAX the sorts
|
boolean |
supports(SearchComponentArguments args)
Returns
true if the component must be executed. |
private static final String __IS_MINIMAL_FORM_SAX_PARAMETER_NAME
public SaxFormSearchComponent()
public int priority()
SearchComponentpriority in interface SearchComponentpublic boolean supports(SearchComponentArguments args)
SearchComponenttrue if the component must be executed.supports in interface SearchComponentargs - the argumentstrue if the component must be executed.public void execute(SearchComponentArguments args) throws Exception
SearchComponentexecute in interface SearchComponentargs - the argumentsException - if an exception occurs. Other search components will be attempted to be executedprotected boolean isMinimalFormSax(Parameters parameters)
true if the Generator is parameterized with a minimal form saxparameters - the parameterstrue if the Generator is parameterized with a minimal form saxprotected void saxFormFields(ContentHandler contentHandler, Parameters parameters, List<FOSearchCriterion> nonStaticCriteria, String language, Site currentSite) throws Exception
protected void saxEnumeratorEntries(ContentHandler contentHandler, FOSearchCriterion criterion, String language, Site currentSite) throws Exception
Enumerator entriesprivate Map<String,Object> _contextualParameters(Site currentSite)
protected void saxEnumeratorEntry(ContentHandler contentHandler, Map.Entry<Object,I18nizableText> enumeratorEntry) throws Exception
Enumerator entrycontentHandler - the content handlerenumeratorEntry - the enumerator entryException - if an exception occursprotected void saxFormValues(ContentHandler contentHandler, Parameters parameters, List<FOSearchCriterion> nonStaticCriteria, Map<String,Object> userCriteria) throws SAXException
contentHandler - the content handlerparameters - the parametersnonStaticCriteria - the non-static criteriauserCriteria - The user input criteriaSAXException - if an error occurs while SAXingprotected void saxFormValue(ContentHandler contentHandler, Attributes attrs, Object userCriterion) throws SAXException
contentHandler - the content handlerattrs - The XML attributesuserCriterion - The user input criterion value (is a List if multiple)SAXException - if an error occurs while SAXingprotected void saxFormSingleValue(ContentHandler contentHandler, Attributes attrs, Object singleUserCriterion) throws SAXException
contentHandler - the content handlerattrs - The XML attributessingleUserCriterion - The user input criterion single valueSAXException - if an error occurs while SAXingprotected void saxFacets(ContentHandler contentHandler, Parameters parameters, Collection<FacetDefinition> facets, Map<String,List<String>> userFacets, Optional<SearchResults<AmetysObject>> searchResults, String currentLang) throws SAXException
contentHandler - the content handlerparameters - the parametersfacets - The facetsuserFacets - The user input facetssearchResults - The search resultscurrentLang - The current langSAXException - if an error occurs while SAXingprotected void saxSorts(ContentHandler contentHandler, Parameters parameters, List<Pair<SortDefinition,Sort.Order>> initialSorts, Collection<SortDefinition> sortsToPropose, List<Pair<String,Sort.Order>> userSorts) throws SAXException
contentHandler - the content handlerparameters - the parametersinitialSorts - The initial sortssortsToPropose - The sorts to proposeuserSorts - The user input sortsSAXException - if an error occurs while SAXingprivate void _addAttributesForSelectedSort(AttributesImpl attrs, Sort.Order direction, int number)