KickJava   Java API By Example, From Geeks To Geeks.

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


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 import java.net.URL JavaDoc;
14
15 import org.eclipse.core.runtime.CoreException;
16 import org.eclipse.core.runtime.IAdaptable;
17 import org.eclipse.core.runtime.IProgressMonitor;
18
19 /**
20  * Feature reference.
21  * A reference to a feature.
22  * <p>
23  * Clients may implement this interface. However, in most cases clients should
24  * directly instantiate or subclass the provided implementation of this
25  * interface.
26  * </p>
27  * <p>
28  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
29  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
30  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
31  * (repeatedly) as the API evolves.
32  * </p>
33  * @see org.eclipse.update.core.FeatureReference
34  * @since 2.0
35  */

36 public interface IFeatureReference extends IAdaptable,IPlatformEnvironment {
37
38     /**
39      * Returns the referenced feature URL.
40      *
41      * @return feature URL
42      * @since 2.0
43      */

44     public URL JavaDoc getURL();
45
46     /**
47      * Returns the update site for the referenced feature
48      *
49      * @return feature site
50      * @since 2.0
51      */

52     public ISite getSite();
53
54     /**
55      * Returns the label for the referenced feature
56      *
57      * @return the label
58      * @since 2.1
59      */

60     public String JavaDoc getName();
61
62
63     /**
64      * Returns the referenced feature.
65      * This is a factory method that creates the full feature object.
66      *
67      * @return the referenced feature
68      * @deprecated use getFeature(IProgressMonitor) instead
69      * @since 2.0
70      */

71     public IFeature getFeature() throws CoreException;
72
73     /**
74      * Returns the referenced feature.
75      * This is a factory method that creates the full feature object.
76      *
77      * @param monitor the progress monitor
78      * @return the referenced feature
79      * @since 2.1
80      */

81     public IFeature getFeature(IProgressMonitor monitor) throws CoreException;
82
83
84     /**
85      * Returns the feature identifier.
86      *
87      * @return the feature identifier.
88      * @exception CoreException
89      * @since 2.0
90      */

91     public VersionedIdentifier getVersionedIdentifier() throws CoreException;
92
93     /**
94      * Sets the feature reference URL.
95      * This is typically performed as part of the feature reference creation
96      * operation. Once set, the url should not be reset.
97      *
98      * @param url reference URL
99      * @since 2.0
100      */

101     public void setURL(URL JavaDoc url) throws CoreException;
102
103     /**
104      * Associates a site with the feature reference.
105      * This is typically performed as part of the feature reference creation
106      * operation. Once set, the site should not be reset.
107      *
108      * @param site site for the feature reference
109      * @since 2.0
110      */

111     public void setSite(ISite site);
112     
113     /**
114      * Returns <code>true</code> if this feature is patching another feature,
115      * <code>false</code> otherwise
116      * @return boolean
117      * @since 2.1
118      */

119     public boolean isPatch();
120     
121     
122 }
123
Popular Tags