public class MatchingSubprogramSearchComponent extends CriterionTreeSearchComponent
SearchComponent for getting subprograms matching search
| Modifier and Type | Class and Description |
|---|---|
private static class |
MatchingSubprogramSearchComponent.NoSubprogramSearchAdditionalParameterValueMap |
| Modifier and Type | Field and Description |
|---|---|
private static String |
__MATCHING_SUBPROGRAM_IDS_ATTR_NAME |
protected ContentSearcherFactory |
_contentSearcherfactory
The content searcher factory
|
__EMPTY_QUERY, _advancedQueryBuilder, _i18nUtils, _treeMakerDISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY| Constructor and Description |
|---|
MatchingSubprogramSearchComponent() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
_containsProgramReturnable(SearchServiceInstance serviceInstance) |
(package private) static List<String> |
_getMatchingSubProgramIds(Request request) |
private boolean |
_mustKeepCriterion(FOSearchCriterion criterion) |
private boolean |
_needSubprogramDiscrimination(SearchServiceInstance serviceInstance) |
(package private) static void |
_removeMatchingSubProgramIdsRequestAttribute(Request request) |
private static void |
_storeInReqMatchingSubProgramIds(Request request,
List<String> subPrograms) |
protected Query |
buildQuery(AbstractTreeNode<FOSearchCriterion> criterionTree,
Map<String,Object> userCriteria,
Collection<Returnable> returnables,
Collection<Searchable> searchables,
AdditionalParameterValueMap additionalParameters,
String currentLang,
Map<String,Object> contextualParameters)
Builds the query of the criterion tree
|
void |
execute(SearchComponentArguments args)
Executes the component.
|
int |
priority()
Get the priority of the component.
|
protected List<String> |
retrieveSubProgramsMatchingSearch(SearchServiceInstance serviceInstance,
Map<String,Object> userCriteria,
String lang)
Retrieves, thanks to a (independent but close to the main one) Solr search, the
SubPrograms that match the same query than the Programs, for further special display. |
void |
service(ServiceManager manager) |
protected Query |
singleCriterionToQuery(FOSearchCriterion searchCriterion,
Map<String,Object> userCriteria,
Collection<Returnable> returnables,
Collection<Searchable> searchables,
AdditionalParameterValueMap additionalParameters,
String currentLang,
Map<String,Object> contextualParameters)
Builds the query of the single criterion
|
boolean |
supports(SearchComponentArguments args)
Returns
true if the component must be executed. |
checkValidInputs, checkValidInputSingleValue, checkValidInputValuesprivate static final String __MATCHING_SUBPROGRAM_IDS_ATTR_NAME
protected ContentSearcherFactory _contentSearcherfactory
public MatchingSubprogramSearchComponent()
public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class CriterionTreeSearchComponentServiceExceptionpublic int priority()
SearchComponentpriority in interface SearchComponentpriority in class CriterionTreeSearchComponentpublic boolean supports(SearchComponentArguments args)
SearchComponenttrue if the component must be executed.supports in interface SearchComponentsupports in class CriterionTreeSearchComponentargs - the argumentstrue if the component must be executed.private boolean _containsProgramReturnable(SearchServiceInstance serviceInstance)
private boolean _needSubprogramDiscrimination(SearchServiceInstance serviceInstance)
public void execute(SearchComponentArguments args) throws Exception
SearchComponentexecute in interface SearchComponentexecute in class CriterionTreeSearchComponentargs - the argumentsException - if an exception occurs. Other search components will be attempted to be executedprotected List<String> retrieveSubProgramsMatchingSearch(SearchServiceInstance serviceInstance, Map<String,Object> userCriteria, String lang) throws Exception
SubPrograms that match the same query than the Programs, for further special display.serviceInstance - The service instanceuserCriteria - The user criterialang - The current langSubPrograms that match the same query than the ProgramsException - If an exception occured during the Solr searchprotected Query buildQuery(AbstractTreeNode<FOSearchCriterion> criterionTree, Map<String,Object> userCriteria, Collection<Returnable> returnables, Collection<Searchable> searchables, AdditionalParameterValueMap additionalParameters, String currentLang, Map<String,Object> contextualParameters)
CriterionTreeSearchComponentbuildQuery in class CriterionTreeSearchComponentcriterionTree - The criterion tree of the service instanceuserCriteria - The user input criteriareturnables - The returnables of the service instancesearchables - The searchables of the service instanceadditionalParameters - The values of additional parameters of the service instancecurrentLang - The current langcontextualParameters - the search contextual parameters.protected Query singleCriterionToQuery(FOSearchCriterion searchCriterion, Map<String,Object> userCriteria, Collection<Returnable> returnables, Collection<Searchable> searchables, AdditionalParameterValueMap additionalParameters, String currentLang, Map<String,Object> contextualParameters)
CriterionTreeSearchComponentsingleCriterionToQuery in class CriterionTreeSearchComponentsearchCriterion - The criterionuserCriteria - The user input criteriareturnables - The returnables of the service instancesearchables - The searchables of the service instanceadditionalParameters - The values of additional parameters of the service instancecurrentLang - The current langcontextualParameters - the search contextual parameters.private boolean _mustKeepCriterion(FOSearchCriterion criterion)
private static void _storeInReqMatchingSubProgramIds(Request request, List<String> subPrograms)
static List<String> _getMatchingSubProgramIds(Request request)
static void _removeMatchingSubProgramIdsRequestAttribute(Request request)