KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > search > IUpdateSearchQuery


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.search;
12
13 import org.eclipse.core.runtime.*;
14 import org.eclipse.update.core.*;
15
16 /**
17  * A search query.
18  * <p>
19  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
20  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
21  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
22  * (repeatedly) as the API evolves.
23  * </p>
24  * @since 3.0
25  */

26
27 public interface IUpdateSearchQuery {
28 /**
29  * Returns an update site adapter that should be added to the scope
30  * while running this query. Some search category may need to
31  * scan specific site adapter in addition to those specified in
32  * the search scope.
33  *
34  * @return the query-specific site adapter or <samp>null</samp> if
35  * not specified.
36  *
37  */

38     public IQueryUpdateSiteAdapter getQuerySearchSite();
39
40 /**
41  * Executes the query. The implementors should scan the provided
42  * update site (skipping certain categories if provided) and
43  * pass the matches to the result collector. The query is also
44  * responsible for scoping and moving the provided progress monitor.
45  *
46  * @param site the update site to scan
47  * @param categoriesToSkip an array of category names that need to be skipped or <samp>null</samp> if categories should not be taken into account.
48  * @param filter a filter to apply before passing the match to collector
49  * @param collector an object that is used for reporting search results
50  * @param monitor a progress monitor to report search progress within the provided site
51  */

52     public void run(ISite site, String JavaDoc [] categoriesToSkip, IUpdateSearchFilter filter, IUpdateSearchResultCollector collector, IProgressMonitor monitor);
53 }
54
Popular Tags