Overview

 
Package  Use  Tree  Deprecated  Index  Help 
Eclipse Platform
Release 3.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

org.eclipse.update.search
Class UpdateSearchRequest

java.lang.Object
  extended byorg.eclipse.update.search.UpdateSearchRequest


public class UpdateSearchRequest
extends Object

This class is central to update search. The search pattern is encapsulated in update search category, while the search scope is defined in the scope object. When these two objects are defined and set, search can be performed using the provided method. Search results are reported to the result collector, while search progress is tracked using the progress monitor.

Classes that implement IUpdateSearchResultCollector should call 'filter' to test if the match should be accepted according to the filters added to the request.

Note: This class/interface is 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.

Since:
3.0
See Also:
UpdateSearchScope, IUpdateSearchCategory


Constructor Summary
UpdateSearchRequest(IUpdateSearchCategory category, UpdateSearchScope scope)
          The constructor that accepts the search category and scope objects.
 
Method Summary
 void addFilter(IUpdateSearchFilter filter)
          Adds a filter to this request.
 IUpdateSearchCategory getCategory()
          Returns the search catagory used in this request.
 UpdateSearchScope getScope()
          Returns the scope of this search request.
 boolean isSearchInProgress()
          Tests whether this search request is current running.
 void performSearch(IUpdateSearchResultCollector collector, IProgressMonitor monitor)
          Runs the search using the category and scope configured into this request.
 void removeFilter(IUpdateSearchFilter filter)
          Removes the filter from this request.
 void setScope(UpdateSearchScope scope)
          Sets the scope object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

 

 

UpdateSearchRequest

public UpdateSearchRequest(IUpdateSearchCategory category,
                           UpdateSearchScope scope)

The constructor that accepts the search category and scope objects.

Parameters:
category - the actual search pattern that should be applied
scope - a list of sites that need to be scanned during the search
Method Detail

 

 

getCategory

public IUpdateSearchCategory getCategory()

Returns the search catagory used in this request.

Returns:
the search category


 

 

getScope

public UpdateSearchScope getScope()

Returns the scope of this search request.

Returns:
search scope


 

 

addFilter

public void addFilter(IUpdateSearchFilter filter)

Adds a filter to this request. This method does nothing if search is alrady in progress.

Parameters:
filter - the filter
See Also:
removeFilter(org.eclipse.update.search.IUpdateSearchFilter)


 

 

removeFilter

public void removeFilter(IUpdateSearchFilter filter)

Removes the filter from this request. This method does nothing if search is alrady in progress.

Parameters:
filter - the filter to remove
See Also:
addFilter(org.eclipse.update.search.IUpdateSearchFilter)


 

 

setScope

public void setScope(UpdateSearchScope scope)

Sets the scope object. It is possible to reuse the search request object by modifying the scope and re-running the search.

Parameters:
scope - the new search scope


 

 

isSearchInProgress

public boolean isSearchInProgress()

Tests whether this search request is current running.

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


 

 

performSearch

public void performSearch(IUpdateSearchResultCollector collector,
                          IProgressMonitor monitor)
                   throws CoreException

Runs the search using the category and scope configured into this request. As results arrive, they are passed to the search result collector object.

Parameters:
collector - matched features are passed to this object
monitor - used to track the search progress
Throws:
CoreException


 

Overview

 
Package  Use  Tree  Deprecated  Index  Help 
Eclipse Platform
Release 3.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.