KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > ifeature > IFeature


1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 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.pde.internal.core.ifeature;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.pde.core.plugin.IPluginModelBase;
15 /**
16  * The top-level model object of the Eclipse feature model.
17  */

18 public interface IFeature extends IFeatureObject, IVersionable, IEnvironment {
19     /**
20      * The name of the property that will be used to notify
21      * about changes in "description" field
22      */

23     public static final String JavaDoc P_DESCRIPTION = "description"; //$NON-NLS-1$
24
/**
25      * The name of the property that will be used to notify
26      * about changes in "copyright" field
27      */

28     public static final String JavaDoc P_COPYRIGHT = "copyright"; //$NON-NLS-1$
29
/**
30      * The name of the property that will be used to notify
31      * about changes in "license" field
32      */

33     public static final String JavaDoc P_LICENSE = "license"; //$NON-NLS-1$
34
/**
35      * The name of the property that will be used to notify
36      * about changes in "provider" field
37      */

38     public static final String JavaDoc P_PROVIDER = "provider"; //$NON-NLS-1$
39
/**
40      * The name of the property that will be used to notify
41      * about changes in "image" field
42      */

43     public static final String JavaDoc P_IMAGE = "image"; //$NON-NLS-1$
44
/**
45      * The name of the property that will be used to notify
46      * about changes in "url" field
47      */

48     public static final String JavaDoc P_URL = "url"; //$NON-NLS-1$
49

50     public static final String JavaDoc P_INSTALL_HANDLER = "installHandler"; //$NON-NLS-1$
51

52     public static final String JavaDoc P_PRIMARY = "primary"; //$NON-NLS-1$
53
public static final String JavaDoc P_EXCLUSIVE = "exclusive"; //$NON-NLS-1$
54
public static final String JavaDoc P_PLUGIN = "plugin"; //$NON-NLS-1$
55

56     public static final String JavaDoc P_COLLOCATION_AFFINITY = "colocation-affinity"; //$NON-NLS-1$
57
public static final String JavaDoc P_APPLICATION = "application"; //$NON-NLS-1$
58

59     public static final int INFO_DESCRIPTION = 0;
60     public static final int INFO_COPYRIGHT = 1;
61     public static final int INFO_LICENSE = 2;
62
63     public static final String JavaDoc[] INFO_TAGS =
64         { "description", "copyright", "license" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
65
/**
66      * Adds a plug-in reference to this feature.
67      * This method may throw a CoreException if
68      * the model is not editable.
69      *
70      * @param reference a plug-in reference to add
71      */

72     public void addPlugins(IFeaturePlugin[] plugins) throws CoreException;
73     /**
74      * Adds a data reference to this feature.
75      * This method may throw a CoreException if
76      * the model is not editable.
77      *
78      * @param entries a data entries to add
79      */

80     public void addData(IFeatureData[] entries) throws CoreException;
81
82     /**
83      * Adds included feature to this feature.
84      * This method may throw a CoreException if
85      * the model is not editable.
86      *
87      * @param features features to include
88      */

89     public void addIncludedFeatures(IFeatureChild[] features)
90         throws CoreException;
91
92     /**
93      * Remove included feature from this feature.
94      * This method may throw a CoreException if
95      * the model is not editable.
96      *
97      * @param features included features to remove
98      */

99     public void removeIncludedFeatures(IFeatureChild[] features)
100         throws CoreException;
101
102     /**
103      * Adds a required plug-in reference to this feature.
104      * This method may throw a CoreException if
105      * the model is not editable.
106      *
107      * @param reference a required plug-in reference to add
108      */

109     public void addImports(IFeatureImport[] imports) throws CoreException;
110     /**
111      * Returns references to plug-ins in this feature
112      *
113      * @return an array of plug-in references in this feature
114      */

115     public IFeaturePlugin[] getPlugins();
116     /**
117      * Returns references to data in this feature
118      *
119      * @return an array of data references in this feature
120      */

121     public IFeatureData[] getData();
122
123     /**
124      * Returns references to required plug-ins in this feature
125      *
126      * @return an array of plug-in references in this feature
127      */

128     public IFeatureImport[] getImports();
129
130     /**
131      * Returns references to included features
132      *
133      * @return an array of feature references included in this feature
134      */

135     public IFeatureChild[] getIncludedFeatures();
136
137     /**
138      * Returns a feature provider name
139      *
140      * @return the feature provider name, or <samp>null</samp> if not set
141      */

142     public String JavaDoc getProviderName();
143     /**
144      * Returns a feature image name
145      *
146      * @return the feature image name, or <samp>null</samp> if not set
147      */

148     public String JavaDoc getImageName();
149     /**
150      *
151      */

152     IPluginModelBase getReferencedModel(IFeaturePlugin reference);
153     /**
154      * Returns a feature URL model object
155      *
156      * @return the feature URL model object, or <samp>null</samp> if not set
157      */

158     public IFeatureURL getURL();
159
160     public IFeatureInstallHandler getInstallHandler();
161     public void setInstallHandler(IFeatureInstallHandler handler)
162         throws CoreException;
163
164     public IFeatureInfo getFeatureInfo(int index);
165
166     public void setFeatureInfo(IFeatureInfo info, int index)
167         throws CoreException;
168
169     /**
170      * Removes a plug-in reference from this feature. This
171      * method may throw a CoreException if the model
172      * is not editable.
173      *
174      * @param plugin a plug-in reference to remove
175      */

176     public void removePlugins(IFeaturePlugin[] plugins) throws CoreException;
177     /**
178      * Removes a data reference from this feature. This
179      * method may throw a CoreException if the model
180      * is not editable.
181      *
182      * @param entries data entries to remove
183      */

184     public void removeData(IFeatureData[] entries) throws CoreException;
185     /**
186      * Removes a required plug-in reference from this feature.
187      * This method may throw a CoreException if
188      * the model is not editable.
189      *
190      * @param iimport a required plug-in reference to add
191      */

192     public void removeImports(IFeatureImport[] imports) throws CoreException;
193     /**
194      * Sets the provider name of this feature. This method
195      * may throw a CoreException if the model is not editable.
196      *
197      * @param the new provider name
198      */

199     public void setProviderName(String JavaDoc providerName) throws CoreException;
200     /**
201      * Sets the image name of this feature. This method
202      * may throw a CoreException if the model is not editable.
203      *
204      * @param the new image name
205      */

206     public void setImageName(String JavaDoc imageName) throws CoreException;
207     /**
208     /**
209      * Sets the URL model object of this feature.
210      *
211      *@param url The URL model object.
212      */

213     public void setURL(IFeatureURL url) throws CoreException;
214
215     public void computeImports() throws CoreException;
216
217     boolean isPrimary();
218     public void setPrimary(boolean value) throws CoreException;
219
220     boolean isExclusive();
221     public void setExclusive(boolean value) throws CoreException;
222
223     String JavaDoc getPlugin();
224     void setPlugin(String JavaDoc value) throws CoreException;
225
226     String JavaDoc getColocationAffinity();
227     void setColocationAffinity(String JavaDoc value) throws CoreException;
228     String JavaDoc getApplication();
229     void setApplication(String JavaDoc value) throws CoreException;
230     
231     boolean isValid();
232 }
233
Popular Tags