KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > ui > IEngineDescriptor


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.help.ui;
12
13 import java.util.Dictionary JavaDoc;
14
15 /**
16  * Descriptor of a concrete instance of a search engine. It describes the search
17  * engine instance that is either loaded from the plug-in extension point contribution,
18  * or created by the user in the scope settings dialog. Engines created by the
19  * user are marked as such. Only user-defined engines will permit their label or
20  * description changed.
21  * <p>
22  * This interface is not intended to be extended or implemented by clients.
23  *
24  * @since 3.1
25  */

26
27 public interface IEngineDescriptor {
28     /**
29      * Returns the unique identifier of this engine instance.
30      *
31      * @return the unique engine identifier
32      */

33     String JavaDoc getId();
34
35     /**
36      * Returns the unique identifier of the engine type of which this is an
37      * instance.
38      *
39      * @return the engine type identifier
40      */

41     String JavaDoc getEngineTypeId();
42
43     /**
44      * Returns the label of this engine for rendering in the UI.
45      *
46      * @return the engine label
47      */

48     String JavaDoc getLabel();
49
50     /**
51      * Changes the label of this engine. This method does nothing for engine
52      * descriptors that are not user-defined.
53      *
54      * @param label
55      * the new engine label
56      */

57     void setLabel(String JavaDoc label);
58
59     /**
60      * Returns the description of this engine instance. It is initialized
61      * from the engine type description.
62      * @return the engine instance description.
63      */

64     String JavaDoc getDescription();
65
66     /**
67      * Changes the description of this engine. This method does nothing for
68      * engine descriptors that are not user-defined.
69      *
70      * @param desc
71      * the new engine description
72      */

73     void setDescription(String JavaDoc desc);
74
75     /**
76      * Returns the parameters used to configure this engine according to the
77      * valid parameters for the associated engine type.
78      *
79      * @return the parameter dictionary
80      */

81     Dictionary JavaDoc getParameters();
82
83     /**
84      * Tests whether this engine is provided as an extension point contribution
85      * or is created by the user in the scope settings dialog. Only user-defined
86      * engine instances can have their label and/or description changed.
87      *
88      * @return <code>true</code> if the engine is user defined, or
89      * <code>false</code> otherwise.
90      */

91     boolean isUserDefined();
92 }
93
Popular Tags