Skip to main content
summaryrefslogtreecommitdiffstats
blob: d17d32b9fc10947e9784cbcd0e9f839414aaf12b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*******************************************************************************
 * Copyright (c) 2000, 2016 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.help.ui;

import java.util.Dictionary;

/**
 * Descriptor of a concrete instance of a search engine. It describes the search
 * engine instance that is either loaded from the plug-in extension point contribution,
 * or created by the user in the scope settings dialog. Engines created by the
 * user are marked as such. Only user-defined engines will permit their label or
 * description changed.
 * <p>
 * This interface is not intended to be extended or implemented by clients.
 *
 * @since 3.1
 * @noimplement This interface is not intended to be implemented by clients.
 * @noextend This interface is not intended to be extended by clients.
 *
 */

public interface IEngineDescriptor {
	/**
	 * Returns the unique identifier of this engine instance.
	 *
	 * @return the unique engine identifier
	 */
	String getId();

	/**
	 * Returns the unique identifier of the engine type of which this is an
	 * instance.
	 *
	 * @return the engine type identifier
	 */
	String getEngineTypeId();

	/**
	 * Returns the label of this engine for rendering in the UI.
	 *
	 * @return the engine label
	 */
	String getLabel();

	/**
	 * Changes the label of this engine. This method does nothing for engine
	 * descriptors that are not user-defined.
	 *
	 * @param label
	 *            the new engine label
	 */
	void setLabel(String label);

	/**
	 * Returns the description of this engine instance. It is initialized
	 * from the engine type description.
	 * @return the engine instance description.
	 */
	String getDescription();

	/**
	 * Changes the description of this engine. This method does nothing for
	 * engine descriptors that are not user-defined.
	 *
	 * @param desc
	 *            the new engine description
	 */
	void setDescription(String desc);

	/**
	 * Returns the parameters used to configure this engine according to the
	 * valid parameters for the associated engine type.
	 *
	 * @return the parameter dictionary
	 */
	Dictionary<String, Object> getParameters();

	/**
	 * Tests whether this engine is provided as an extension point contribution
	 * or is created by the user in the scope settings dialog. Only user-defined
	 * engine instances can have their label and/or description changed.
	 *
	 * @return <code>true</code> if the engine is user defined, or
	 *         <code>false</code> otherwise.
	 */
	boolean isUserDefined();
}

Back to the top