Remote Systems
v6.4.1

com.ibm.etools.systems.subsystems
Interface IRemoteSearchResultSet

All Known Implementing Classes:
RemoteSearchResultSetImpl

public interface IRemoteSearchResultSet

A remote search result set represents a page in the Remote Search view. A search result set contains multiple search configurations and their results. This allows it to contain results from multiple connections, filters, and folders (from different systems).


Method Summary
 void addResult(IRemoteSearchResultConfiguration config, Object result)
          Add a result for a search configuration.
 void addSearchConfiguration(IRemoteSearchResultConfiguration config)
          Add a search configuration.
 void cancel()
          Cancels the search.
 void dispose()
          Removes all configurations.
 Object[] getAllResults()
          Returns all results of the search.
 String getName()
          Gets the name of the search that is being run.
 int getNumOfResults()
          Gets the number of results.
 Object[] getResultsForConfiguration(IRemoteSearchResultConfiguration config)
          Returns the results of a particular search configuration.
 Iterator getSearchConfigurations()
          Returns an iterator over search configurations.
 boolean isCancelled()
          Returns whether the search is cancelled.
 boolean isDisconnected()
          Returns whether the search is disconnected.
 boolean isFinished()
          Returns whether the search is finished.
 boolean isRunning()
          Returns whether search is running.
 void removeAllResults()
          Removes all results of the search.
 void removeAndAddResult(Object oldResult, Object newResult)
          Removes the old result from configurations where it is found, and add the new result to those configurations.
 void removeResult(IRemoteSearchResultConfiguration config, Object result)
          Removes a result from a search configuration.
 void removeResult(Object result)
          Removes a result from all search configurations where it exists.
 void removeSearchConfiguration(IRemoteSearchResultConfiguration config)
          Removes a search configuration.
 void setName(String name)
          Sets the name of the search.
 

Method Detail

setName

public void setName(String name)
Sets the name of the search.

Parameters:
name - the name of the search.

getName

public String getName()
Gets the name of the search that is being run.

Returns:
the name of the search.

addSearchConfiguration

public void addSearchConfiguration(IRemoteSearchResultConfiguration config)
Add a search configuration.

Parameters:
config - a search configuration.

removeSearchConfiguration

public void removeSearchConfiguration(IRemoteSearchResultConfiguration config)
Removes a search configuration.

Parameters:
config - a search configuration.

getSearchConfigurations

public Iterator getSearchConfigurations()
Returns an iterator over search configurations.

Returns:
an iterator over search configurations.

addResult

public void addResult(IRemoteSearchResultConfiguration config,
                      Object result)
Add a result for a search configuration.

Parameters:
config - a search configuration that was previously added.
result - a search result.

removeResult

public void removeResult(IRemoteSearchResultConfiguration config,
                         Object result)
Removes a result from a search configuration.

Parameters:
config - a search configuration that was previously added.
result - a search result.

removeResult

public void removeResult(Object result)
Removes a result from all search configurations where it exists.

Parameters:
result - a search result.

removeAndAddResult

public void removeAndAddResult(Object oldResult,
                               Object newResult)
Removes the old result from configurations where it is found, and add the new result to those configurations.

Parameters:
oldResult - the old result.
newResult - the new result.

getResultsForConfiguration

public Object[] getResultsForConfiguration(IRemoteSearchResultConfiguration config)
Returns the results of a particular search configuration.

Parameters:
config - a search configuration.
Returns:
the results for the given search configuration.

getAllResults

public Object[] getAllResults()
Returns all results of the search.

Returns:
all results of the search.

removeAllResults

public void removeAllResults()
Removes all results of the search.


getNumOfResults

public int getNumOfResults()
Gets the number of results.

Returns:
the number of results.

cancel

public void cancel()
Cancels the search. Cancel those configurations that are still running.


dispose

public void dispose()
Removes all configurations. First cancels the search, then calls the dispose method of the configurations before removing them.


isRunning

public boolean isRunning()
Returns whether search is running. A search is running if any of the configurations is running.

Returns:
true if the search is running, false otherwise.

isCancelled

public boolean isCancelled()
Returns whether the search is cancelled. A search is cancelled if all of the configurations are cancelled.

Returns:
true if the search is cancelled, false otherwise.

isFinished

public boolean isFinished()
Returns whether the search is finished. A search is finished if all the configurations are finished.

Returns:
true if the search is finished, false otherwise.

isDisconnected

public boolean isDisconnected()
Returns whether the search is disconnected. A search is disconnected if all the configurations are disconnected.

Returns:
true if the search is disconnected, false otherwise.

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.