svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.lib / org.gvsig.installer.lib.api / src / main / java / org / gvsig / installer / lib / api / PackageInfo.java @ 37489
History | View | Annotate | Download (8.59 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2010 {Prodevelop} {Task}
|
26 |
*/
|
27 |
|
28 |
package org.gvsig.installer.lib.api; |
29 |
|
30 |
import java.io.File; |
31 |
import java.net.URL; |
32 |
import java.util.List; |
33 |
|
34 |
import org.gvsig.installer.lib.api.InstallerManager.ARCH; |
35 |
import org.gvsig.installer.lib.api.InstallerManager.JVM; |
36 |
import org.gvsig.installer.lib.api.InstallerManager.OS; |
37 |
import org.gvsig.installer.lib.api.InstallerManager.STATE; |
38 |
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException; |
39 |
import org.gvsig.tools.lang.Cloneable; |
40 |
import org.gvsig.tools.task.SimpleTaskStatus; |
41 |
|
42 |
/**
|
43 |
* Information of a package that is used on the installation process.
|
44 |
* This information is composed by next fields:
|
45 |
* </br> <li>
|
46 |
* <lu><b>Code</b>: unique identifier for the package.</lu> <lu><b>Name</b>:
|
47 |
* name of the package.</lu> <lu><b>Description</b>: brief description of the
|
48 |
* package functionality</lu> * <lu><b>Version</b>: number of version.</lu>
|
49 |
* <lu><b>Build</b>: build number.</lu> <lu><b>State</b>: the state of the
|
50 |
* package (testing, RC1...).</lu> <lu><b>Operating system</b>: the operating
|
51 |
* system supported (lin, win, mac_10_6, ...).</lu> <lu><b>Architecture</b>: the
|
52 |
* state of the package (testing, RC1, ...).</lu> <lu><b>JavaVM</b>: the minimum
|
53 |
* java version supported (1.5, 1.6, ...).</lu> <lu><b>Is Official</b>: if the
|
54 |
* package is official or if is a not official package.</lu> <lu><b>Type</b>:
|
55 |
* package type (plugin, theme, translation...). Depending of this value a
|
56 |
* different installation provider is selected to control the installation
|
57 |
* process.</lu> <li>
|
58 |
*
|
59 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
60 |
*/
|
61 |
public interface PackageInfo extends Cloneable { |
62 |
|
63 |
/**
|
64 |
* @return
|
65 |
* Gets the code of the package.
|
66 |
*/
|
67 |
public String getCode(); |
68 |
|
69 |
public void setCode(String code); |
70 |
|
71 |
public String getID(); |
72 |
|
73 |
/**
|
74 |
* @return
|
75 |
* Gets the name of the package.
|
76 |
*/
|
77 |
public String getName(); |
78 |
|
79 |
public void setName(String name); |
80 |
|
81 |
/**
|
82 |
* @return
|
83 |
* Gets the description of the package.
|
84 |
*/
|
85 |
public String getDescription(); |
86 |
|
87 |
public void setDescription(String description); |
88 |
|
89 |
/**
|
90 |
* @return
|
91 |
* Gets the version of the package.
|
92 |
*/
|
93 |
public Version getVersion();
|
94 |
|
95 |
public void setVersion(String version); |
96 |
public void setVersion(Version version); |
97 |
|
98 |
/**
|
99 |
* @return
|
100 |
* Gets the build number of the package.
|
101 |
*/
|
102 |
public int getBuild(); |
103 |
|
104 |
public void setBuild(int build); |
105 |
|
106 |
/**
|
107 |
* @return
|
108 |
* Gets the state of the package.
|
109 |
* @see STATE
|
110 |
*/
|
111 |
public String getState(); |
112 |
|
113 |
/**
|
114 |
* Sets the state of the package
|
115 |
*
|
116 |
* @param state
|
117 |
* @see STATE
|
118 |
*/
|
119 |
public void setState(String state); |
120 |
|
121 |
/**
|
122 |
* @return
|
123 |
* Gets if the package is official.
|
124 |
*/
|
125 |
public boolean isOfficial(); |
126 |
|
127 |
public void setOfficial(boolean official); |
128 |
|
129 |
/**
|
130 |
* @return
|
131 |
* Gets the type of the package.
|
132 |
*/
|
133 |
public String getType(); |
134 |
|
135 |
public void setType(String type); |
136 |
|
137 |
/**
|
138 |
* Returns the supported operating system.
|
139 |
*
|
140 |
* @return the supported operating system
|
141 |
* @see OS
|
142 |
*/
|
143 |
public String getOperatingSystem(); |
144 |
|
145 |
/**
|
146 |
* Sets the supported operating system.
|
147 |
*
|
148 |
* @param operatingSystem
|
149 |
* the supported operating system
|
150 |
* @see OS
|
151 |
*/
|
152 |
public void setOperatingSystem(String operatingSystem); |
153 |
|
154 |
/**
|
155 |
* Returns the supported hardware architecture.
|
156 |
*
|
157 |
* @return the supported hardware architecture
|
158 |
* @see ARCH
|
159 |
*/
|
160 |
public String getArchitecture(); |
161 |
|
162 |
/**
|
163 |
* Sets the supported hardware architecture.
|
164 |
*
|
165 |
* @param architecture
|
166 |
* the supported hardware architecture
|
167 |
* @see ARCH
|
168 |
*/
|
169 |
public void setArchitecture(String architecture); |
170 |
|
171 |
/**
|
172 |
* Returns the supported java vm version.
|
173 |
*
|
174 |
* @return the supported java vm version
|
175 |
* @see JVM
|
176 |
*/
|
177 |
public String getJavaVM(); |
178 |
|
179 |
/**
|
180 |
* Sets the supported java vm version.
|
181 |
*
|
182 |
* @param javaVM
|
183 |
* the supported java vm version
|
184 |
* @see JVM
|
185 |
*/
|
186 |
public void setJavaVM(String javaVM); |
187 |
|
188 |
/**
|
189 |
* Returns the supported gvSIG version.
|
190 |
*
|
191 |
* @return the supported gvSIG version
|
192 |
*/
|
193 |
public String getGvSIGVersion(); |
194 |
|
195 |
/**
|
196 |
* Sets the supported gvSIG version.
|
197 |
*
|
198 |
* @param gvSIGVersion
|
199 |
* the supported gvSIG version
|
200 |
*/
|
201 |
public void setGvSIGVersion(String gvSIGVersion); |
202 |
|
203 |
/**
|
204 |
* Returns the package bundle download {@link URL}.
|
205 |
*
|
206 |
* May be null if there is no remote URL to download the bundle.
|
207 |
*
|
208 |
* @return the package bundle download {@link URL}
|
209 |
*/
|
210 |
public URL getDownloadURL(); |
211 |
|
212 |
// /**
|
213 |
// * Returns the package bundle download {@link URL}.
|
214 |
// *
|
215 |
// * May be null if there is no remote URL to download the bundle.
|
216 |
// *
|
217 |
// * @return the package bundle download {@link URL}
|
218 |
// */
|
219 |
public URL getDownloadURL(URL baseURL); |
220 |
|
221 |
/**
|
222 |
* Sets the package bundle download {@link URL}. Optional.
|
223 |
*
|
224 |
* @param defaultURL
|
225 |
* the package bundle download {@link URL}
|
226 |
*/
|
227 |
public void setDownloadURL(URL defaultURL); |
228 |
|
229 |
/**
|
230 |
* Returns the package info model version.
|
231 |
*
|
232 |
* @return the package info model version
|
233 |
*/
|
234 |
public String getModelVersion(); |
235 |
|
236 |
/**
|
237 |
* Sets the package info model version.
|
238 |
*
|
239 |
* @param modelVersion
|
240 |
* the package info model version
|
241 |
*/
|
242 |
public void setModelVersion(String modelVersion); |
243 |
|
244 |
public String getOwner(); |
245 |
|
246 |
/**
|
247 |
* Sets the package owner.
|
248 |
*
|
249 |
* @param owner
|
250 |
* the package owner
|
251 |
*/
|
252 |
public void setOwner(String owner); |
253 |
|
254 |
/**
|
255 |
* Returns the package source files url {@link URL}.
|
256 |
*
|
257 |
* @return the package source files url {@link URL}
|
258 |
*/
|
259 |
public URL getSourcesURL(); |
260 |
|
261 |
/**
|
262 |
* Sets the package sources.
|
263 |
*
|
264 |
* @param sources
|
265 |
* the package sources
|
266 |
*/
|
267 |
public void setSourcesURL(URL sources); |
268 |
|
269 |
/**
|
270 |
* Returns the package web url {@link URL}.
|
271 |
*
|
272 |
* @return the package web url {@link URL}
|
273 |
*/
|
274 |
public URL getWebURL(); |
275 |
|
276 |
/**
|
277 |
* Sets the package web url {@link URL}.
|
278 |
*
|
279 |
* @param webURL
|
280 |
* the package web url {@link URL}
|
281 |
*/
|
282 |
public void setWebURL(URL webURL); |
283 |
|
284 |
/**
|
285 |
* Gets the ant script that has to be executed in the
|
286 |
* installation process.
|
287 |
*
|
288 |
* @return
|
289 |
* the script.
|
290 |
*/
|
291 |
public String getAntScript(); |
292 |
|
293 |
/**
|
294 |
* Sets the ant script that can be executed in the
|
295 |
* installation process.
|
296 |
*
|
297 |
* @param antScript
|
298 |
* The ant script to copy.
|
299 |
*/
|
300 |
public void setAntScript(String antScript); |
301 |
|
302 |
public File downloadFile() throws InstallPackageServiceException; |
303 |
|
304 |
public File downloadFile(SimpleTaskStatus taskStatus) |
305 |
throws InstallPackageServiceException;
|
306 |
|
307 |
/**
|
308 |
* @return
|
309 |
*/
|
310 |
public void addFileToCopy(File file); |
311 |
|
312 |
public File getFileToCopy(int i); |
313 |
|
314 |
public void removeFileToCopy(File file); |
315 |
|
316 |
public void clearFilesToCopy(); |
317 |
|
318 |
public List<File> getFilesToCopy(); |
319 |
|
320 |
/**
|
321 |
* @param folder
|
322 |
* @return
|
323 |
*/
|
324 |
public boolean removeInstallFolder(File folder); |
325 |
|
326 |
public boolean removeFilesFolder(File folder); |
327 |
|
328 |
/**
|
329 |
* @param string
|
330 |
* @return
|
331 |
*/
|
332 |
public boolean matchID(String string); |
333 |
|
334 |
public Dependencies getDependencies();
|
335 |
|
336 |
public void setDependencies(String dependencies); |
337 |
|
338 |
public void setDependencies(Dependencies dependencies); |
339 |
|
340 |
public String toStringCompact(); |
341 |
} |