KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > configuration > IInstallConfiguration


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.configuration;
12
13 import java.io.File JavaDoc;
14 import java.util.Date JavaDoc;
15
16 import org.eclipse.core.runtime.CoreException;
17 import org.eclipse.core.runtime.IAdaptable;
18
19 /**
20  * Installation configuration.
21  * Represents a specific configuration of a number of sites as a point
22  * in time. Maintains a record of the specific activities that resulted
23  * in this configuration. Current installation configuration is
24  * the configuration the platform was started with.
25  * <p>
26  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
27  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
28  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
29  * (repeatedly) as the API evolves.
30  * </p>
31  * @since 2.0
32  */

33 public interface IInstallConfiguration extends IAdaptable {
34
35     /**
36      * Indicates if this is the current configuration
37      *
38      * @return <code>true</code> if this is the current configuration,
39      * <code>false</code> otherwise
40      * @since 2.0
41      * <p>
42      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
43      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
44      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
45      * (repeatedly) as the API evolves.
46      * </p>
47      */

48     public boolean isCurrent();
49
50     /**
51      * Return the sites that are part of this configuration.
52      *
53      * @return an array of configured sites, or an empty array.
54      * @since 2.0
55      * <p>
56      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
57      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
58      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
59      * (repeatedly) as the API evolves.
60      * </p>
61      */

62     public IConfiguredSite[] getConfiguredSites();
63
64     /**
65      * Create a new installation site, based on a local file
66      * system directory. Note, the site is not added to the
67      * configuration as a result of this call.
68      *
69      * @param directory file directory
70      * @return new site
71      * @exception CoreException
72      * @since 2.0
73      * <p>
74      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
75      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
76      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
77      * (repeatedly) as the API evolves.
78      * </p>
79      */

80     public IConfiguredSite createConfiguredSite(File JavaDoc directory) throws CoreException;
81
82     /**
83      * Create a new linked site, based on a local file
84      * system directory. Note, the site is not added to the
85      * configuration as a result of this call.
86      * The linked site is only created if the directory is an
87      * already existing extension site and if it is not already
88      * natively linked to the local site.
89      *
90      * @param directory file directory
91      * @return new linked site
92      * @exception CoreException
93      * @since 2.0
94      * <p>
95      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
96      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
97      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
98      * (repeatedly) as the API evolves.
99      * </p>
100      */

101     public IConfiguredSite createLinkedConfiguredSite(File JavaDoc directory) throws CoreException;
102
103     /**
104      * Adds the specified site to this configuration.
105      *
106      * @param site new site
107      * @since 2.0
108      * <p>
109      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
110      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
111      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
112      * (repeatedly) as the API evolves.
113      * </p>
114      */

115     public void addConfiguredSite(IConfiguredSite site);
116
117     /**
118      * Removes the specified site from this configuration.
119      *
120      * @param site site to remove
121      * @since 2.0
122      * <p>
123      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
124      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
125      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
126      * (repeatedly) as the API evolves.
127      * </p>
128      */

129     public void removeConfiguredSite(IConfiguredSite site);
130
131     /**
132      * Adds a configuration change listener.
133      *
134      * @param listener the listener
135      * @since 2.0
136      * <p>
137      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
138      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
139      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
140      * (repeatedly) as the API evolves.
141      * </p>
142      */

143     public void addInstallConfigurationChangedListener(IInstallConfigurationChangedListener listener);
144
145     /**
146      * Removes a configuration change listener.
147      *
148      * @param listener the listener
149      * @since 2.0
150      * <p>
151      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
152      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
153      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
154      * (repeatedly) as the API evolves.
155      * </p>
156      */

157     public void removeInstallConfigurationChangedListener(IInstallConfigurationChangedListener listener);
158
159     /**
160      * Return the list of activities that resulted in this configuration.
161      * There is always at least one activity
162      *
163      * @return an array of activities
164      * @since 2.0
165      * <p>
166      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
167      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
168      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
169      * (repeatedly) as the API evolves.
170      * </p>
171      */

172     public IActivity[] getActivities();
173
174     /**
175      * Retrun the date the configuration was created.
176      *
177      * @return create date
178      * @since 2.0
179      * <p>
180      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
181      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
182      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
183      * (repeatedly) as the API evolves.
184      * </p>
185      */

186     public Date JavaDoc getCreationDate();
187
188     /**
189      * Return the configuration label.
190      *
191      * @return the configuration label. If the configuration label was not
192      * explicitly set, a default label is generated based on the creation
193      * date
194      * @since 2.0
195      * <p>
196      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
197      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
198      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
199      * (repeatedly) as the API evolves.
200      * </p>
201      */

202     public String JavaDoc getLabel();
203
204     /**
205      * Sets the configuration label.
206      *
207      * @param label the label
208      * @since 2.0
209      * <p>
210      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
211      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
212      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
213      * (repeatedly) as the API evolves.
214      * </p>
215      */

216     public void setLabel(String JavaDoc label);
217
218     /**
219      * Returns an integer that represents a time stamp created at the beginning of a new configuration time line.
220      * Time line is started when configuration state is created by a full file system reconciliation. All configurations
221      * subsequently created will have the same time line until the next full reconciliation. Certain operations
222      * (e.g. revert) make sense only between objects that belong to the same time line.
223      *
224      * @since 2.0.2
225      * @return the time stamp of the full system reconciliation
226      *
227      * <b>Note:</b> This method is part of an interim API that is still under development and expected to
228      * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
229      * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
230      * (repeatedly) as the API evolves.
231      * </p>
232      */

233     public long getTimeline();
234
235 }
236
Popular Tags