RSE
Release 3.2

org.eclipse.rse.subsystems.files.core.subsystems
Class RemoteSearchResultConfiguration

java.lang.Object
  extended by org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultConfiguration
All Implemented Interfaces:
IHostSearchResultConfiguration

public class RemoteSearchResultConfiguration
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.


Field Summary
protected  Map _containedResults
           
protected  ISearchHandler _searchHandler
           
protected  IHostSearchResultSet parentResultSet
           
protected  Vector results
           
protected  SystemSearchString searchString
           
protected  Object searchTarget
           
protected  int status
           
 
Constructor Summary
RemoteSearchResultConfiguration(IHostSearchResultSet resultSet, Object searchObject, SystemSearchString string)
          Constructor for a result set configuration.
 
Method Summary
 void addResult(Object result)
          Adds a search result.
 void addResults(Object container, IHostSearchResult[] results)
          Adds a set of search results along their associated container
 void cancel()
          Does nothing.
 void dispose()
          Cancels the search and then removes the search results.
 IHostSearchResult[] getContainedResults(Object resultContainer)
          Gets the results contained within the resultContainer
 IHostSearchResultSet getParentResultSet()
          Gets the parent result set.
 Object[] getResults()
          Gets search results.
 int getResultsSize()
          Gets the size of the results.
 ISearchHandler getSearchHandler()
          Gets the search handler.
 SystemSearchString getSearchString()
          Gets the search string.
 Object getSearchTarget()
          Gets the object to be searched.
 int getStatus()
          Gets the status of the search.
 void removeAndAddResult(Object oldResult, Object newResult)
          Removes the old result and adds a new result.
 void removeResult(Object result)
          Removes a search result.
 void removeResults()
          Removes all search results.
 void setParentResultSet(IHostSearchResultSet resultSet)
          Sets the parent result set.
 void setSearchHandler(ISearchHandler handler)
          Sets the search handler
 void setSearchString(SystemSearchString string)
          Sets the search string.
 void setSearchTarget(Object searchObject)
          Sets the object to be searched.
 void setStatus(int status)
          Sets the status of the search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentResultSet

protected IHostSearchResultSet parentResultSet

searchTarget

protected Object searchTarget

searchString

protected SystemSearchString searchString

results

protected Vector results

status

protected int status

_containedResults

protected Map _containedResults

_searchHandler

protected ISearchHandler _searchHandler
Constructor Detail

RemoteSearchResultConfiguration

public RemoteSearchResultConfiguration(IHostSearchResultSet resultSet,
                                       Object searchObject,
                                       SystemSearchString string)
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.
Method Detail

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.
See Also:
IHostSearchResultConfiguration.setParentResultSet(org.eclipse.rse.services.search.IHostSearchResultSet)

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.
See Also:
IHostSearchResultConfiguration.getParentResultSet()

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.
See Also:
IHostSearchResultConfiguration.setSearchTarget(java.lang.Object)

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.
See Also:
IHostSearchResultConfiguration.getSearchTarget()

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.
See Also:
IHostSearchResultConfiguration.setSearchString(org.eclipse.rse.services.clientserver.SystemSearchString)

getSearchString

public SystemSearchString getSearchString()
Description copied from interface: IHostSearchResultConfiguration
Gets the search string.

Specified by:
getSearchString in interface IHostSearchResultConfiguration
Returns:
string the search string.
See Also:
IHostSearchResultConfiguration.getSearchString()

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.
See Also:
IHostSearchResultConfiguration.addResult(java.lang.Object)

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.
See Also:
IHostSearchResultConfiguration.removeResult(java.lang.Object)

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.
See Also:
IHostSearchResultConfiguration.removeAndAddResult(java.lang.Object, java.lang.Object)

getResults

public Object[] getResults()
Description copied from interface: IHostSearchResultConfiguration
Gets search results.

Specified by:
getResults in interface IHostSearchResultConfiguration
Returns:
search results.
See Also:
IHostSearchResultConfiguration.getResults()

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.
See Also:
IHostSearchResultConfiguration.getResultsSize()

removeResults

public void removeResults()
Description copied from interface: IHostSearchResultConfiguration
Removes all search results.

Specified by:
removeResults in interface IHostSearchResultConfiguration
See Also:
IHostSearchResultConfiguration.removeResults()

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.
See Also:
IHostSearchResultConfiguration.setStatus(int)

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.
See Also:
IHostSearchResultConfiguration.getStatus()

cancel

public void cancel()
Does nothing.

Specified by:
cancel in interface IHostSearchResultConfiguration
See Also:
IHostSearchResultConfiguration.cancel()

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
See Also:
IHostSearchResultConfiguration.dispose()

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 handler)
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.

RSE
Release 3.2

Copyright (c) IBM Corporation and others 2000, 2010. All Rights Reserved.