svn-gvsig-desktop / tags / v2_0_0_Build_2038 / extensions / org.gvsig.installer / org.gvsig.installer.lib / org.gvsig.installer.lib.api / src / main / java / org / gvsig / installer / lib / api / PackageInfo.java @ 37126
History | View | Annotate | Download (8.32 KB)
1 | 32269 | jpiera | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | 33692 | cordinyana | *
|
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 | 32269 | jpiera | |
23 | /*
|
||
24 | 33692 | cordinyana | * AUTHORS (In addition to CIT):
|
25 | * 2010 {Prodevelop} {Task}
|
||
26 | */
|
||
27 | |||
28 | 32269 | jpiera | package org.gvsig.installer.lib.api; |
29 | |||
30 | import java.io.File; |
||
31 | 33982 | cordinyana | import java.net.URL; |
32 | 34974 | nfrancisco | import java.util.List; |
33 | 32269 | jpiera | |
34 | 33743 | cordinyana | 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 | 34925 | nfrancisco | import org.gvsig.installer.lib.api.execution.InstallPackageServiceException; |
39 | 34444 | cordinyana | import org.gvsig.tools.lang.Cloneable; |
40 | 34925 | nfrancisco | import org.gvsig.tools.task.SimpleTaskStatus; |
41 | 33743 | cordinyana | |
42 | 32269 | jpiera | /**
|
43 | 33692 | cordinyana | * Information of a package that is used on the installation process.
|
44 | 32467 | jpiera | * This information is composed by next fields:
|
45 | 33692 | cordinyana | * </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 | 32269 | jpiera | * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
60 | */
|
||
61 | 34444 | cordinyana | public interface PackageInfo extends Cloneable { |
62 | 33692 | cordinyana | |
63 | /**
|
||
64 | * @return
|
||
65 | * Gets the code of the package.
|
||
66 | */
|
||
67 | public String getCode(); |
||
68 | |||
69 | public void setCode(String code); |
||
70 | 35486 | nfrancisco | |
71 | 35189 | nfrancisco | public String getID(); |
72 | 33692 | cordinyana | |
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 | 35979 | jjdelcerro | public Version getVersion();
|
94 | 33692 | cordinyana | |
95 | public void setVersion(String version); |
||
96 | 35979 | jjdelcerro | public void setVersion(Version version); |
97 | 33692 | cordinyana | |
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 | 33743 | cordinyana | * @see STATE
|
110 | 33692 | cordinyana | */
|
111 | public String getState(); |
||
112 | |||
113 | 33743 | cordinyana | /**
|
114 | * Sets the state of the package
|
||
115 | *
|
||
116 | * @param state
|
||
117 | * @see STATE
|
||
118 | */
|
||
119 | 33692 | cordinyana | 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 | 33743 | cordinyana | /**
|
138 | * Returns the supported operating system.
|
||
139 | *
|
||
140 | * @return the supported operating system
|
||
141 | * @see OS
|
||
142 | */
|
||
143 | 33686 | cordinyana | public String getOperatingSystem(); |
144 | |||
145 | 33743 | cordinyana | /**
|
146 | * Sets the supported operating system.
|
||
147 | *
|
||
148 | * @param operatingSystem
|
||
149 | * the supported operating system
|
||
150 | * @see OS
|
||
151 | */
|
||
152 | 33686 | cordinyana | public void setOperatingSystem(String operatingSystem); |
153 | |||
154 | 33743 | cordinyana | /**
|
155 | * Returns the supported hardware architecture.
|
||
156 | *
|
||
157 | * @return the supported hardware architecture
|
||
158 | * @see ARCH
|
||
159 | */
|
||
160 | 33686 | cordinyana | public String getArchitecture(); |
161 | |||
162 | 33743 | cordinyana | /**
|
163 | * Sets the supported hardware architecture.
|
||
164 | *
|
||
165 | * @param architecture
|
||
166 | * the supported hardware architecture
|
||
167 | * @see ARCH
|
||
168 | */
|
||
169 | 33686 | cordinyana | public void setArchitecture(String architecture); |
170 | |||
171 | 33743 | cordinyana | /**
|
172 | * Returns the supported java vm version.
|
||
173 | *
|
||
174 | * @return the supported java vm version
|
||
175 | * @see JVM
|
||
176 | */
|
||
177 | 33686 | cordinyana | public String getJavaVM(); |
178 | |||
179 | 33743 | cordinyana | /**
|
180 | * Sets the supported java vm version.
|
||
181 | *
|
||
182 | * @param javaVM
|
||
183 | * the supported java vm version
|
||
184 | * @see JVM
|
||
185 | */
|
||
186 | 33686 | cordinyana | public void setJavaVM(String javaVM); |
187 | |||
188 | 33982 | cordinyana | /**
|
189 | * Returns the supported gvSIG version.
|
||
190 | *
|
||
191 | * @return the supported gvSIG version
|
||
192 | */
|
||
193 | 33686 | cordinyana | public String getGvSIGVersion(); |
194 | |||
195 | 33982 | cordinyana | /**
|
196 | * Sets the supported gvSIG version.
|
||
197 | *
|
||
198 | * @param gvSIGVersion
|
||
199 | * the supported gvSIG version
|
||
200 | */
|
||
201 | 33686 | cordinyana | public void setGvSIGVersion(String gvSIGVersion); |
202 | |||
203 | 33692 | cordinyana | /**
|
204 | 33982 | cordinyana | * 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 | * Sets the package bundle download {@link URL}. Optional.
|
||
214 | *
|
||
215 | * @param defaultURL
|
||
216 | * the package bundle download {@link URL}
|
||
217 | */
|
||
218 | public void setDownloadURL(URL defaultURL); |
||
219 | |||
220 | /**
|
||
221 | 34005 | cordinyana | * Returns the package info model version.
|
222 | *
|
||
223 | * @return the package info model version
|
||
224 | */
|
||
225 | public String getModelVersion(); |
||
226 | |||
227 | /**
|
||
228 | * Sets the package info model version.
|
||
229 | *
|
||
230 | * @param modelVersion
|
||
231 | * the package info model version
|
||
232 | */
|
||
233 | public void setModelVersion(String modelVersion); |
||
234 | 35979 | jjdelcerro | |
235 | 35966 | nfrancisco | public String getOwner(); |
236 | |||
237 | 34005 | cordinyana | /**
|
238 | 35966 | nfrancisco | * Sets the package owner.
|
239 | *
|
||
240 | * @param owner
|
||
241 | * the package owner
|
||
242 | */
|
||
243 | public void setOwner(String owner); |
||
244 | |||
245 | /**
|
||
246 | * Returns the package source files url {@link URL}.
|
||
247 | *
|
||
248 | * @return the package source files url {@link URL}
|
||
249 | */
|
||
250 | public URL getSourcesURL(); |
||
251 | 35979 | jjdelcerro | |
252 | 35966 | nfrancisco | /**
|
253 | * Sets the package sources.
|
||
254 | *
|
||
255 | * @param sources
|
||
256 | * the package sources
|
||
257 | */
|
||
258 | public void setSourcesURL(URL sources); |
||
259 | 36756 | cordinyana | |
260 | /**
|
||
261 | * Returns the package web url {@link URL}.
|
||
262 | *
|
||
263 | * @return the package web url {@link URL}
|
||
264 | */
|
||
265 | public URL getWebURL(); |
||
266 | |||
267 | /**
|
||
268 | * Sets the package web url {@link URL}.
|
||
269 | *
|
||
270 | * @param webURL
|
||
271 | * the package web url {@link URL}
|
||
272 | */
|
||
273 | public void setWebURL(URL webURL); |
||
274 | 35966 | nfrancisco | |
275 | /**
|
||
276 | 34974 | nfrancisco | * Gets the ant script that has to be executed in the
|
277 | * installation process.
|
||
278 | 33692 | cordinyana | *
|
279 | * @return
|
||
280 | 34974 | nfrancisco | * the script.
|
281 | 33692 | cordinyana | */
|
282 | 34974 | nfrancisco | public String getAntScript(); |
283 | 33692 | cordinyana | |
284 | /**
|
||
285 | * Sets the ant script that can be executed in the
|
||
286 | * installation process.
|
||
287 | *
|
||
288 | * @param antScript
|
||
289 | * The ant script to copy.
|
||
290 | */
|
||
291 | 34974 | nfrancisco | public void setAntScript(String antScript); |
292 | 33692 | cordinyana | |
293 | 35486 | nfrancisco | public File downloadFile() throws InstallPackageServiceException; |
294 | |||
295 | public File downloadFile(SimpleTaskStatus taskStatus) |
||
296 | 34925 | nfrancisco | throws InstallPackageServiceException;
|
297 | 35486 | nfrancisco | |
298 | /**
|
||
299 | * @return
|
||
300 | */
|
||
301 | public void addFileToCopy(File file); |
||
302 | |||
303 | public File getFileToCopy(int i); |
||
304 | |||
305 | public void removeFileToCopy(File file); |
||
306 | |||
307 | public void clearFilesToCopy(); |
||
308 | |||
309 | public List<File> getFilesToCopy(); |
||
310 | |||
311 | /**
|
||
312 | * @param folder
|
||
313 | * @return
|
||
314 | */
|
||
315 | public boolean removeInstallFolder(File folder); |
||
316 | 34925 | nfrancisco | |
317 | 35486 | nfrancisco | public boolean removeFilesFolder(File folder); |
318 | 34925 | nfrancisco | |
319 | 35966 | nfrancisco | /**
|
320 | * @param string
|
||
321 | * @return
|
||
322 | */
|
||
323 | public boolean matchID(String string); |
||
324 | |||
325 | 35979 | jjdelcerro | public Dependencies getDependencies();
|
326 | |||
327 | public void setDependencies(String dependencies); |
||
328 | |||
329 | public void setDependencies(Dependencies dependencies); |
||
330 | |||
331 | public String toStringCompact(); |
||
332 | 32269 | jpiera | } |