KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > runtime > IProduct


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 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.core.runtime;
12
13 import org.osgi.framework.Bundle;
14
15 /**
16  * Products are the Eclipse unit of branding. From the runtime point of view they have
17  * a name, id and description and identify the Eclipse application to run.
18  * <p>
19  * Since the bulk of the branding related information is
20  * specific to the UI, products also carry an arbitrary set of properties. The valid set of
21  * key-value pairs and their interpretation defined by the UI of the target environment.
22  * For example, in the standard Eclipse UI, <code>org.eclipse.ui.branding.IProductConstants</code>
23  * the properties of interest to the UI. Other clients may specify additional properties.
24  * </p><p>
25  * Products can be defined directly using extensions to the <code>org.eclipse.core.runtime.products</code>
26  * extension point or by using facilities provided by IProductProvider implementations.
27  * </p><p>
28  * For readers familiar with Eclipse 2.1 and earlier, products are roughly equivalent to
29  * <i>primary features</i>.
30  * </p>
31  *
32  * @see IProductProvider
33  * @see org.eclipse.ui.branding.IProductConstants
34  * @since 3.0
35  */

36 public interface IProduct {
37     /**
38      * Returns the application associated with this product. This information is used
39      * to guide the runtime as to what application extension to create and execute.
40      *
41      * @return this product's application or <code>null</code> if none
42      */

43     public String JavaDoc getApplication();
44
45     /**
46      * Returns the name of this product. The name is typically used in the title
47      * bar of UI windows.
48      *
49      * @return the name of this product or <code>null</code> if none
50      */

51     public String JavaDoc getName();
52
53     /**
54      * Returns the text description of this product
55      *
56      * @return the description of this product or <code>null</code> if none
57      */

58     public String JavaDoc getDescription();
59
60     /** Returns the unique product id of this product.
61      *
62      * @return the id of this product
63      */

64     public String JavaDoc getId();
65
66     /**
67      * Returns the property of this product with the given key.
68      * <code>null</code> is returned if there is no such key/value pair.
69      *
70      * @param key the name of the property to return
71      * @return the value associated with the given key or <code>null</code> if none
72      */

73     public String JavaDoc getProperty(String JavaDoc key);
74     
75     /**
76      * Returns the bundle which is responsible for the definition of this product.
77      * Typically this is used as a base for searching for images and other files
78      * that are needed in presenting the product.
79      *
80      * @return the bundle which defines this product or <code>null</code> if none
81      */

82     public Bundle getDefiningBundle();
83 }
84
Popular Tags