KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > core > IImport


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.update.core;
12
13
14 import org.eclipse.core.runtime.IAdaptable;
15
16 /**
17  * Plug-in dependency entry.
18  * Describes a feture dependency on a particular plug-in. The dependency
19  * can specify a specific plug-in version and a matching rule for
20  * satisfying the dependency.
21  * <p>
22  * Clients may implement this interface. However, in most cases clients should
23  * directly instantiate or subclass the provided implementation of this
24  * interface.
25  * </p>
26  * <p>
27  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
28  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
29  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
30  * (repeatedly) as the API evolves.
31  * </p>
32  * @see org.eclipse.update.core.Import
33  * @since 2.0
34  */

35 public interface IImport extends IAdaptable, IUpdateConstants, IPlatformEnvironment {
36
37     /**
38      * The import relates to a plugin
39      * @since 2.0.2
40      */

41     public static final int KIND_PLUGIN = 0;
42     
43     /**
44      * The import relates to a feature
45      * @since 2.0.2
46      */

47     public static final int KIND_FEATURE = 1;
48
49     /**
50      * Returns an identifier of the dependent plug-in.
51      *
52      * @return plug-in identifier
53      * @since 2.0
54      */

55     public VersionedIdentifier getVersionedIdentifier();
56
57     /**
58      * Returns the matching rule for the dependency.
59      *
60      * @return matching rule
61      * @since 2.0
62      */

63     public int getRule();
64     
65     /**
66      * Returns the matching rule for the dependency identifier.
67      *
68      * @return matching id rule
69      * @since 2.1
70      */

71     public int getIdRule();
72     
73     /**
74      * Returns the dependency kind
75      *
76      * @see #KIND_PLUGIN
77      * @see #KIND_FEATURE
78      * @return KIND_PLUGIN if the dependency relates to a plugin,
79      * KIND_FEATURE if the dependency relates to a feature.
80      */

81     public int getKind();
82     
83     /**
84      * Returns the patch mode. If the import is in patch mode,
85      * the referenced feature is considered a patch target,
86      * and the feature that owns the import is patch carrier.
87      * Patch carrier and patched feature are linked in a
88      * distinct way: if a patched feature is disabled,
89      * all the patches are disabled with it.
90      * @return true if the element represents a patch
91      * reference, false otherwise.
92      */

93     public boolean isPatch();
94 }
95
Popular Tags