no.sesat.search.mode.command
Interface SearchCommand

All Superinterfaces:
Callable<ResultList<ResultItem>>
All Known Implementing Classes:
AbstractSearchCommand, AbstractWebServiceSearchCommand, AbstractXmlSearchCommand, AbstractYahooSearchCommand, MathExpressionSearchCommand, OverturePPCSearchCommand, PicSearchCommand, PlatefoodPPCSearchCommand, PropertiesCommand, SolrSearchCommand, StaticSearchCommand, StockSearchCommand, YahooIdpSearchCommand, YahooMediaSearchCommand, YahooWebSearchCommand, YoutubeSearchCommand

public interface SearchCommand
extends Callable<ResultList<ResultItem>>

Behavour requirements for any implementating Search Command.

Version:
$Id: SearchCommand.java 7225 2009-04-09 00:32:20Z ssmiweve $

Nested Class Summary
static interface SearchCommand.Context
          Being a factory for all the commands - it propagates all the contextual needs of the underlying commands it creates.
 
Method Summary
 ResultList<ResultItem> call()
          From Callable interface.
 SearchConfiguration getSearchConfiguration()
          Returns the configuration associated with this search command.
 boolean handleCancellation()
          Allows the SearchCommand to clean itself after a long night out when s/he didn't get home in time.
 boolean isCancelled()
          Has this command be cancelled.
 boolean isPaginated()
          Can this command provide paginated results.
 boolean isUserSortable()
          Can this command be sorted differently at user's requst.
 

Method Detail

getSearchConfiguration

SearchConfiguration getSearchConfiguration()
Returns the configuration associated with this search command. Typically delegates to the context provided.

Returns:
The search configuration.

call

ResultList<ResultItem> call()
From Callable interface.

Specified by:
call in interface Callable<ResultList<ResultItem>>
Returns:
the completed search result list.

handleCancellation

boolean handleCancellation()
Allows the SearchCommand to clean itself after a long night out when s/he didn't get home in time.

Returns:
if cleaning was actually performed

isCancelled

boolean isCancelled()
Has this command be cancelled.

Returns:
true if cancelled.

isPaginated

boolean isPaginated()
Can this command provide paginated results.

Returns:
true if results can be paginated.

isUserSortable

boolean isUserSortable()
Can this command be sorted differently at user's requst.

Returns:
true if user sorting is applicable.


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.