org.eclipse.rse.services.search
Class AbstractSearchResultConfiguration
java.lang.Object
org.eclipse.rse.services.search.AbstractSearchResultConfiguration
-
All Implemented Interfaces:
-
IHostSearchResultConfiguration
-
public abstract class AbstractSearchResultConfiguration
- extends
Object
- implements
IHostSearchResultConfiguration
This class represents a search result configuration. A configuration
consists of a search target and a search string, and belongs to a search
result set. Once a search has been started via a subsystem, the results
are stored in the configuration itself. The status of the search can also be queried from
the configuration.
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
parentResultSet
protected
IHostSearchResultSet parentResultSet
searchTarget
protected
Object searchTarget
searchString
protected
SystemSearchString searchString
results
protected
Vector results
_containedResults
protected
Map _containedResults
status
protected int status
_searchService
protected
ISearchService _searchService
_searchHandler
protected
ISearchHandler _searchHandler
AbstractSearchResultConfiguration
public AbstractSearchResultConfiguration(
IHostSearchResultSet resultSet,
Object searchObject,
SystemSearchString string,
ISearchService searchService)
- Constructor for a result set configuration. Sets status to
RUNNING
.
-
Parameters:
-
resultSet
- the parent result set. -
searchObject
- the target of the search. -
string
- the search string.
setParentResultSet
public void setParentResultSet(
IHostSearchResultSet resultSet)
-
Description copied from interface:
IHostSearchResultConfiguration
- Sets the parent result set.
-
-
Specified by:
-
setParentResultSet
in interface
IHostSearchResultConfiguration
-
-
Parameters:
-
resultSet
- the parent result set.
getParentResultSet
public
IHostSearchResultSet getParentResultSet()
-
Description copied from interface:
IHostSearchResultConfiguration
- Gets the parent result set.
-
-
Specified by:
-
getParentResultSet
in interface
IHostSearchResultConfiguration
-
-
Returns:
- the parent result set.
getSearchService
public
ISearchService getSearchService()
-
-
setSearchTarget
public void setSearchTarget(
Object searchObject)
-
Description copied from interface:
IHostSearchResultConfiguration
- Sets the object to be searched.
-
-
Specified by:
-
setSearchTarget
in interface
IHostSearchResultConfiguration
-
-
Parameters:
-
searchObject
- the object to be searched.
getSearchTarget
public
Object getSearchTarget()
-
Description copied from interface:
IHostSearchResultConfiguration
- Gets the object to be searched.
-
-
Specified by:
-
getSearchTarget
in interface
IHostSearchResultConfiguration
-
-
Returns:
- the object to be searched.
setSearchString
public void setSearchString(
SystemSearchString string)
-
Description copied from interface:
IHostSearchResultConfiguration
- Sets the search string.
-
-
Specified by:
-
setSearchString
in interface
IHostSearchResultConfiguration
-
-
Parameters:
-
string
- the search string.
getSearchString
public
SystemSearchString getSearchString()
-
Description copied from interface:
IHostSearchResultConfiguration
- Gets the search string.
-
-
Specified by:
-
getSearchString
in interface
IHostSearchResultConfiguration
-
-
Returns:
- string the search string.
addResult
public void addResult(
Object result)
-
Description copied from interface:
IHostSearchResultConfiguration
- Adds a search result.
-
-
Specified by:
-
addResult
in interface
IHostSearchResultConfiguration
-
-
Parameters:
-
result
- a search result.
removeResult
public void removeResult(
Object result)
-
Description copied from interface:
IHostSearchResultConfiguration
- Removes a search result.
-
-
Specified by:
-
removeResult
in interface
IHostSearchResultConfiguration
-
-
Parameters:
-
result
- a search result.
removeAndAddResult
public void removeAndAddResult(
Object oldResult,
Object newResult)
-
Description copied from interface:
IHostSearchResultConfiguration
- Removes the old result and adds a new result.
-
-
Specified by:
-
removeAndAddResult
in interface
IHostSearchResultConfiguration
-
-
Parameters:
-
oldResult
- the old result. -
newResult
- the new result.
getResults
public
Object[] getResults()
-
Description copied from interface:
IHostSearchResultConfiguration
- Gets search results.
-
-
Specified by:
-
getResults
in interface
IHostSearchResultConfiguration
-
-
Returns:
- search results.
getContainedResults
public
IHostSearchResult[] getContainedResults(
Object resultContainer)
-
Description copied from interface:
IHostSearchResultConfiguration
- Gets the results contained within the resultContainer
-
-
Specified by:
-
getContainedResults
in interface
IHostSearchResultConfiguration
-
-
Returns:
- the results
getResultsSize
public int getResultsSize()
-
Description copied from interface:
IHostSearchResultConfiguration
- Gets the size of the results.
-
-
Specified by:
-
getResultsSize
in interface
IHostSearchResultConfiguration
-
-
Returns:
- the size of the results.
removeResults
public void removeResults()
-
Description copied from interface:
IHostSearchResultConfiguration
- Removes all search results.
-
-
Specified by:
-
removeResults
in interface
IHostSearchResultConfiguration
-
setStatus
public void setStatus(int status)
-
Description copied from interface:
IHostSearchResultConfiguration
- Sets the status of the search. One of
RUNNING
, FINISHED
,
CANCELLED
, or DISCONNECTED
.
-
-
Specified by:
-
setStatus
in interface
IHostSearchResultConfiguration
-
-
Parameters:
-
status
- the status.
getStatus
public int getStatus()
-
Description copied from interface:
IHostSearchResultConfiguration
- Gets the status of the search. One of
RUNNING
, FINISHED
,
CANCELLED
, or DISCONNECTED
.
-
-
Specified by:
-
getStatus
in interface
IHostSearchResultConfiguration
-
-
Returns:
- the status of the search.
cancel
public void cancel()
-
Description copied from interface:
IHostSearchResultConfiguration
- Cancels the search if it is running.
-
-
Specified by:
-
cancel
in interface
IHostSearchResultConfiguration
-
dispose
public void dispose()
-
Description copied from interface:
IHostSearchResultConfiguration
- Cancels the search and then removes the search results. Implementors should call
super
first.
-
-
Specified by:
-
dispose
in interface
IHostSearchResultConfiguration
-
addResults
public void addResults(
Object container,
IHostSearchResult[] results)
-
Description copied from interface:
IHostSearchResultConfiguration
- Adds a set of search results along their associated container
-
-
Specified by:
-
addResults
in interface
IHostSearchResultConfiguration
-
setSearchHandler
public void setSearchHandler(
ISearchHandler searchHandler)
-
Description copied from interface:
IHostSearchResultConfiguration
- Sets the search handler
-
-
Specified by:
-
setSearchHandler
in interface
IHostSearchResultConfiguration
-
getSearchHandler
public
ISearchHandler getSearchHandler()
- Gets the search handler.
-
-
-
Returns:
- the search handler.
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.