public class SearchService extends StaticService
| Modifier and Type | Class and Description | 
|---|---|
| (package private) static class  | SearchService.ParsedAdditionalParameterConf | 
| Modifier and Type | Field and Description | 
|---|---|
| protected SearchServiceCreationHelper | _creationHelperThe helper component for defining this service | 
| protected RenderingContextHandler | _renderingContextHandlerThe handler of rendering context | 
| protected SearchServiceInstanceManager | _searchServiceInstanceManagerThe manager for  SearchServiceInstance | 
| static String | PARAM_NAME_COMPUTE_COUNTSThe parameter name for computing counts | 
| static String | PARAM_NAME_CONTEXTSThe parameter name for contexts | 
| static String | PARAM_NAME_CRITERIAThe parameter name for criteria | 
| static String | PARAM_NAME_FACETSThe parameter name for facets | 
| static String | PARAM_NAME_HEADERThe parameter name for header | 
| static String | PARAM_NAME_INITIAL_SORTSThe parameter name for initial sorts | 
| static String | PARAM_NAME_LAUNCH_SEARCH_AT_STARTUPThe parameter name for launching search at startup | 
| static String | PARAM_NAME_LINK_PAGEThe parameter name for link page | 
| static String | PARAM_NAME_LINK_TITLEThe parameter name for link title | 
| static String | PARAM_NAME_MAX_RESULTSThe parameter name for maximum number of results | 
| static String | PARAM_NAME_PROPOSED_SORTSThe parameter name for proposed sorts | 
| static String | PARAM_NAME_RESULT_PAGEThe parameter name for result page | 
| static String | PARAM_NAME_RESULT_PLACEThe parameter name for result place | 
| static String | PARAM_NAME_RESULTS_PER_PAGEThe parameter name for number of results per page | 
| static String | PARAM_NAME_RETURNABLESThe parameter name for returnables | 
| static String | PARAM_NAME_RIGHT_CHECKING_MODEThe parameter name for right checking mode | 
| static String | PARAM_NAME_RSSThe parameter name for handling RSS | 
| static String | PARAM_NAME_SAVE_USER_PREFSThe parameter name for saving user preferences | 
| static String | PARAM_NAME_SERVICE_GROUP_IDThe parameter name for service group id | 
| static String | PARAM_NAME_XSLTThe parameter name for XSLT | 
| static String | ROLEAvalon Role | 
_context, _featureName, _manager, _modelItems, _paramsScript, _pluginName, _view| Constructor and Description | 
|---|
| SearchService() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Collection<AdditionalSearchServiceParameter> | _buildAdditionalSearchServiceParameters(Map<String,SearchService.ParsedAdditionalParameterConf> parsedAdditionalParameterConfs)Build the  AdditionalSearchServiceParameters from intermediateSearchService.ParsedAdditionalParameterConfobjects. | 
| protected List<String> | _fieldsReloadingWidget(Collection<AdditionalSearchServiceParameter> additionalParameters)Gets the names of the fields which will launch a reload of this widget when their value change | 
| private static boolean | _hasUserInput(SearchServiceInstance serviceInstance) | 
| private boolean | _isDebug(Request request,
        RenderingContextHandler renderingContextHandler) | 
| protected Map<String,SearchService.ParsedAdditionalParameterConf> | _parseAndInjectDisplayAdditionalParameters(DefaultConfiguration lastGroupConf)Retrieve the configurations of additional parameters for 'Display' group, inject them into the group configuration and return their parsed representation. | 
| protected Map<String,SearchService.ParsedAdditionalParameterConf> | _parseAndInjectGeneralAdditionalParameters(DefaultConfiguration firstGroupConf)Retrieve the configurations of additional parameters for 'General' group, inject them into the group configuration and return their parsed representation. | 
| protected void | _setWidgetParameters(String parameterName,
                    List<String> fieldsReloadingCriteriaWidget)Set the widget parameters of the given parameter, by adding the list of the fields reloading the widget | 
| protected void | configureParameters(Configuration parametersConfiguration)Configure the service parameters. | 
| static boolean | hasUserCriteria(Optional<AbstractTreeNode<FOSearchCriterion>> criterionTree)Returns  trueif the given instance of search service has at least one user criterion | 
| static boolean | hasUserInput(Optional<AbstractTreeNode<FOSearchCriterion>> criterionTree,
            Collection<FacetDefinition> facets,
            Collection<SortDefinition> proposedSorts)Returns  trueif the given instance of search service has some user input | 
| boolean | isCacheable(Page currentPage,
           ZoneItem zoneItem)Returns true if the result of this service may be cached, depending on the  ZoneItemcontaining an instance of this service. | 
| void | service(ServiceManager smanager) | 
_configureClass, _configureImports, _configureScript, _parseChildren, _parseI18nizableText, _parseParameter, _parseParameter, _parseRepeater, _parseRepeater, _parseSimpleViewItemGroup, configure, configureDialogBoxDimension, configureIndexation, contextualize, dispose, getCategory, getCreationBoxHeight, getCreationBoxWidth, getCSSFiles, getDescription, getIconDecorator, getIconGlyph, getId, getLabel, getLargeIcon, getMediumIcon, getModelItems, getName, getParameters, getParametersScript, getPluginName, getRight, getSmallIcon, getURL, getView, index, isPrivate, setPluginInfogetLogger, setLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFamilyIdgetChild, getModelItem, hasModelItempublic static final String ROLE
public static final String PARAM_NAME_HEADER
public static final String PARAM_NAME_RETURNABLES
public static final String PARAM_NAME_CONTEXTS
public static final String PARAM_NAME_CRITERIA
public static final String PARAM_NAME_COMPUTE_COUNTS
public static final String PARAM_NAME_FACETS
public static final String PARAM_NAME_INITIAL_SORTS
public static final String PARAM_NAME_PROPOSED_SORTS
public static final String PARAM_NAME_RESULTS_PER_PAGE
public static final String PARAM_NAME_MAX_RESULTS
public static final String PARAM_NAME_RIGHT_CHECKING_MODE
public static final String PARAM_NAME_XSLT
public static final String PARAM_NAME_RESULT_PLACE
public static final String PARAM_NAME_RESULT_PAGE
public static final String PARAM_NAME_LAUNCH_SEARCH_AT_STARTUP
public static final String PARAM_NAME_SERVICE_GROUP_ID
public static final String PARAM_NAME_LINK_PAGE
public static final String PARAM_NAME_LINK_TITLE
public static final String PARAM_NAME_RSS
public static final String PARAM_NAME_SAVE_USER_PREFS
protected SearchServiceCreationHelper _creationHelper
protected RenderingContextHandler _renderingContextHandler
protected SearchServiceInstanceManager _searchServiceInstanceManager
SearchServiceInstancepublic SearchService()
public void service(ServiceManager smanager) throws ServiceException
service in interface Serviceableservice in class StaticServiceServiceExceptionpublic static boolean hasUserInput(Optional<AbstractTreeNode<FOSearchCriterion>> criterionTree, Collection<FacetDefinition> facets, Collection<SortDefinition> proposedSorts)
true if the given instance of search service has some user inputcriterionTree - The tree of criteria of the search service instancefacets - The facets of the search service instanceproposedSorts - The proposed sorts of the search service instancetrue if the given instance of search service has some user inputpublic static boolean hasUserCriteria(Optional<AbstractTreeNode<FOSearchCriterion>> criterionTree)
true if the given instance of search service has at least one user criterioncriterionTree - The tree of criteria of the search service instancetrue if the given instance of search service has at least one user criterionprivate static boolean _hasUserInput(SearchServiceInstance serviceInstance)
public boolean isCacheable(Page currentPage, ZoneItem zoneItem)
ServiceZoneItem containing an instance of this service.isCacheable in interface ServiceisCacheable in class StaticServicecurrentPage - the current Page containing the service.zoneItem - the ZoneItem containing an instance of this service.private boolean _isDebug(Request request, RenderingContextHandler renderingContextHandler)
protected void configureParameters(Configuration parametersConfiguration) throws ConfigurationException
StaticServiceconfigureParameters in class StaticServiceparametersConfiguration - the service parameters configuration.ConfigurationException - if an error occurs.protected Map<String,SearchService.ParsedAdditionalParameterConf> _parseAndInjectGeneralAdditionalParameters(DefaultConfiguration firstGroupConf)
firstGroupConf - The first group configuration ('General') for injecting.SearchService.ParsedAdditionalParameterConfsprotected Map<String,SearchService.ParsedAdditionalParameterConf> _parseAndInjectDisplayAdditionalParameters(DefaultConfiguration lastGroupConf)
lastGroupConf - The last group configuration ('Display') for injecting.SearchService.ParsedAdditionalParameterConfsprotected Collection<AdditionalSearchServiceParameter> _buildAdditionalSearchServiceParameters(Map<String,SearchService.ParsedAdditionalParameterConf> parsedAdditionalParameterConfs)
AdditionalSearchServiceParameters from intermediate SearchService.ParsedAdditionalParameterConf objects.parsedAdditionalParameterConfs - The parsed configurations for each additional parameterAdditionalSearchServiceParametersprotected void _setWidgetParameters(String parameterName, List<String> fieldsReloadingCriteriaWidget)
parameterName - The parameter namefieldsReloadingCriteriaWidget - the names of the fields which will launch a reload of the widget when their value changeprotected List<String> _fieldsReloadingWidget(Collection<AdditionalSearchServiceParameter> additionalParameters)
additionalParameters - The additional parameters