public class ReturnableSearchComponent extends Object implements SearchComponent
SearchComponent
for restricting the results to the Returnable
sDISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY
Constructor and Description |
---|
ReturnableSearchComponent() |
Modifier and Type | Method and Description |
---|---|
protected ContextQueriesWrapper |
_createContextQueriesWrapper(SearchContext searchContext,
Site currentSite,
Page currentPage,
String currentLang)
Creates a
ContextQueriesWrapper given one SearchContext and the current site, page and lang. |
void |
execute(SearchComponentArguments args)
Executes the component.
|
int |
priority()
Get the priority of the component.
|
boolean |
supports(SearchComponentArguments args)
Returns
true if the component must be executed . |
public ReturnableSearchComponent()
public int priority()
SearchComponent
priority
in interface SearchComponent
public boolean supports(SearchComponentArguments args)
SearchComponent
true
if the component must be executed
.supports
in interface SearchComponent
args
- the argumentstrue
if the component must be executed
.public void execute(SearchComponentArguments args) throws Exception
SearchComponent
execute
in interface SearchComponent
args
- the argumentsException
- if an exception occurs. Other search components will be attempted to be executedprotected ContextQueriesWrapper _createContextQueriesWrapper(SearchContext searchContext, Site currentSite, Page currentPage, String currentLang)
ContextQueriesWrapper
given one SearchContext
and the current site, page and lang.searchContext
- The search contextcurrentSite
- The current sitecurrentPage
- The current pagecurrentLang
- The current langSearchContext