Remote Systems
v6.4.1

com.ibm.etools.systems.subsystems.impl
Class RemoteSearchResultSetImpl

java.lang.Object
  extended bycom.ibm.etools.systems.subsystems.impl.RemoteSearchResultSetImpl
All Implemented Interfaces:
IAdaptable, IRemoteSearchResultSet

public class RemoteSearchResultSetImpl
extends Object
implements IRemoteSearchResultSet, IAdaptable

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


Field Summary
protected  Vector configurations
           
protected  String name
           
 
Constructor Summary
RemoteSearchResultSetImpl()
          Constructor to create a result set.
 
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 getAdapter(Class adapter)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configurations

protected Vector configurations

name

protected String name
Constructor Detail

RemoteSearchResultSetImpl

public RemoteSearchResultSetImpl()
Constructor to create a result set.

Method Detail

setName

public void setName(String name)
Description copied from interface: IRemoteSearchResultSet
Sets the name of the search.

Specified by:
setName in interface IRemoteSearchResultSet
Parameters:
name - the name of the search.
See Also:
IRemoteSearchResultSet.setName(java.lang.String)

getName

public String getName()
Description copied from interface: IRemoteSearchResultSet
Gets the name of the search that is being run.

Specified by:
getName in interface IRemoteSearchResultSet
Returns:
the name of the search.
See Also:
IRemoteSearchResultSet.getName()

addSearchConfiguration

public void addSearchConfiguration(IRemoteSearchResultConfiguration config)
Description copied from interface: IRemoteSearchResultSet
Add a search configuration.

Specified by:
addSearchConfiguration in interface IRemoteSearchResultSet
Parameters:
config - a search configuration.
See Also:
IRemoteSearchResultSet.addSearchConfiguration(com.ibm.etools.systems.subsystems.IRemoteSearchResultConfiguration)

removeSearchConfiguration

public void removeSearchConfiguration(IRemoteSearchResultConfiguration config)
Description copied from interface: IRemoteSearchResultSet
Removes a search configuration.

Specified by:
removeSearchConfiguration in interface IRemoteSearchResultSet
Parameters:
config - a search configuration.
See Also:
IRemoteSearchResultSet.removeSearchConfiguration(com.ibm.etools.systems.subsystems.IRemoteSearchResultConfiguration)

getSearchConfigurations

public Iterator getSearchConfigurations()
Description copied from interface: IRemoteSearchResultSet
Returns an iterator over search configurations.

Specified by:
getSearchConfigurations in interface IRemoteSearchResultSet
Returns:
an iterator over search configurations.
See Also:
IRemoteSearchResultSet.getSearchConfigurations()

addResult

public void addResult(IRemoteSearchResultConfiguration config,
                      Object result)
Description copied from interface: IRemoteSearchResultSet
Add a result for a search configuration.

Specified by:
addResult in interface IRemoteSearchResultSet
Parameters:
config - a search configuration that was previously added.
result - a search result.
See Also:
IRemoteSearchResultSet.addResult(com.ibm.etools.systems.subsystems.IRemoteSearchResultConfiguration, java.lang.Object)

removeResult

public void removeResult(IRemoteSearchResultConfiguration config,
                         Object result)
Description copied from interface: IRemoteSearchResultSet
Removes a result from a search configuration.

Specified by:
removeResult in interface IRemoteSearchResultSet
Parameters:
config - a search configuration that was previously added.
result - a search result.
See Also:
IRemoteSearchResultSet.removeResult(com.ibm.etools.systems.subsystems.IRemoteSearchResultConfiguration, java.lang.Object)

getResultsForConfiguration

public Object[] getResultsForConfiguration(IRemoteSearchResultConfiguration config)
Description copied from interface: IRemoteSearchResultSet
Returns the results of a particular search configuration.

Specified by:
getResultsForConfiguration in interface IRemoteSearchResultSet
Parameters:
config - a search configuration.
Returns:
the results for the given search configuration.
See Also:
IRemoteSearchResultSet.getResultsForConfiguration(com.ibm.etools.systems.subsystems.IRemoteSearchResultConfiguration)

getAllResults

public Object[] getAllResults()
Description copied from interface: IRemoteSearchResultSet
Returns all results of the search.

Specified by:
getAllResults in interface IRemoteSearchResultSet
Returns:
all results of the search.
See Also:
IRemoteSearchResultSet.getAllResults()

removeAllResults

public void removeAllResults()
Description copied from interface: IRemoteSearchResultSet
Removes all results of the search.

Specified by:
removeAllResults in interface IRemoteSearchResultSet
See Also:
IRemoteSearchResultSet.removeAllResults()

getNumOfResults

public int getNumOfResults()
Description copied from interface: IRemoteSearchResultSet
Gets the number of results.

Specified by:
getNumOfResults in interface IRemoteSearchResultSet
Returns:
the number of results.
See Also:
IRemoteSearchResultSet.getNumOfResults()

cancel

public void cancel()
Description copied from interface: IRemoteSearchResultSet
Cancels the search. Cancel those configurations that are still running.

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

removeResult

public void removeResult(Object result)
Description copied from interface: IRemoteSearchResultSet
Removes a result from all search configurations where it exists.

Specified by:
removeResult in interface IRemoteSearchResultSet
Parameters:
result - a search result.
See Also:
IRemoteSearchResultSet.removeResult(java.lang.Object)

removeAndAddResult

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

Specified by:
removeAndAddResult in interface IRemoteSearchResultSet
Parameters:
oldResult - the old result.
newResult - the new result.
See Also:
IRemoteSearchResultSet.removeAndAddResult(java.lang.Object, java.lang.Object)

dispose

public void dispose()
Description copied from interface: IRemoteSearchResultSet
Removes all configurations. First cancels the search, then calls the dispose method of the configurations before removing them.

Specified by:
dispose in interface IRemoteSearchResultSet
See Also:
IRemoteSearchResultSet.dispose()

isCancelled

public boolean isCancelled()
Description copied from interface: IRemoteSearchResultSet
Returns whether the search is cancelled. A search is cancelled if all of the configurations are cancelled.

Specified by:
isCancelled in interface IRemoteSearchResultSet
Returns:
true if the search is cancelled, false otherwise.
See Also:
IRemoteSearchResultSet.isCancelled()

isFinished

public boolean isFinished()
Description copied from interface: IRemoteSearchResultSet
Returns whether the search is finished. A search is finished if all the configurations are finished.

Specified by:
isFinished in interface IRemoteSearchResultSet
Returns:
true if the search is finished, false otherwise.
See Also:
IRemoteSearchResultSet.isFinished()

isRunning

public boolean isRunning()
Description copied from interface: IRemoteSearchResultSet
Returns whether search is running. A search is running if any of the configurations is running.

Specified by:
isRunning in interface IRemoteSearchResultSet
Returns:
true if the search is running, false otherwise.
See Also:
IRemoteSearchResultSet.isRunning()

isDisconnected

public boolean isDisconnected()
Description copied from interface: IRemoteSearchResultSet
Returns whether the search is disconnected. A search is disconnected if all the configurations are disconnected.

Specified by:
isDisconnected in interface IRemoteSearchResultSet
Returns:
true if the search is disconnected, false otherwise.
See Also:
IRemoteSearchResultSet.isDisconnected()

getAdapter

public Object getAdapter(Class adapter)
Specified by:
getAdapter in interface IAdaptable
See Also:
IAdaptable.getAdapter(java.lang.Class)

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.