Statistics
| Revision:

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 @ 37538

History | View | Annotate | Download (8.93 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&aacute;</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
    public String getDownloadURLAsString();
213
    
214
//    /**
215
//     * Returns the package bundle download {@link URL}.
216
//     * 
217
//     * May be null if there is no remote URL to download the bundle.
218
//     * 
219
//     * @return the package bundle download {@link URL}
220
//     */
221
    public URL getDownloadURL(URL baseURL);
222

    
223
    /**
224
     * Sets the package bundle download {@link URL}. Optional.
225
     * 
226
     * @param defaultURL
227
     *            the package bundle download {@link URL}
228
     */
229
    public void setDownloadURL(URL defaultURL);
230
    
231
    public void setDownloadURL(String defaultDownloadURL);
232
    
233
    /**
234
     * Returns the package info model version.
235
     * 
236
     * @return the package info model version
237
     */
238
    public String getModelVersion();
239

    
240
    /**
241
     * Sets the package info model version.
242
     * 
243
     * @param modelVersion
244
     *            the package info model version
245
     */
246
    public void setModelVersion(String modelVersion);
247
    
248
    public String getOwner();
249
    
250
    /**
251
     * Sets the package owner.
252
     * 
253
     * @param owner
254
     *            the package owner
255
     */
256
    public void setOwner(String owner);
257
    
258
    /**
259
     * Returns the package source files url {@link URL}.
260
     * 
261
     * @return the package source files url {@link URL}
262
     */
263
    public URL getSourcesURL();
264

    
265
    /**
266
     * Sets the package sources.
267
     * 
268
     * @param sources
269
     *            the package sources
270
     */
271
    public void setSourcesURL(URL sources);
272

    
273
    /**
274
     * Returns the package web url {@link URL}.
275
     * 
276
     * @return the package web url {@link URL}
277
     */
278
    public URL getWebURL();
279

    
280
    /**
281
     * Sets the package web url {@link URL}.
282
     * 
283
     * @param webURL
284
     *            the package web url {@link URL}
285
     */
286
    public void setWebURL(URL webURL);
287
    
288
    /**
289
     * Gets the ant script that has to be executed in the
290
     * installation process.
291
     * 
292
     * @return
293
     *         the script.
294
     */
295
    public String getAntScript();
296

    
297
    /**
298
     * Sets the ant script that can be executed in the
299
     * installation process.
300
     * 
301
     * @param antScript
302
     *            The ant script to copy.
303
     */
304
    public void setAntScript(String antScript);
305

    
306
    public File downloadFile() throws InstallPackageServiceException;
307

    
308
    public File downloadFile(SimpleTaskStatus taskStatus)
309
        throws InstallPackageServiceException;
310

    
311
    /**
312
     * @return
313
     */
314
    public void addFileToCopy(File file);
315

    
316
    public File getFileToCopy(int i);
317

    
318
    public void removeFileToCopy(File file);
319

    
320
    public void clearFilesToCopy();
321

    
322
    public List<File> getFilesToCopy();
323

    
324
    /**
325
     * @param folder
326
     * @return
327
     */
328
    public boolean removeInstallFolder(File folder);
329
    
330
    public boolean removeFilesFolder(File folder);
331

    
332
    /**
333
     * @param string
334
     * @return
335
     */
336
    public boolean matchID(String string);
337

    
338
    public Dependencies getDependencies();
339
    
340
    public void setDependencies(String dependencies);
341
    
342
    public void setDependencies(Dependencies dependencies);
343
    
344
    public String toStringCompact();
345
    
346
    public List<String> getCategories();
347
    
348
    public void setCategories(List<String> categoriesList);
349
    
350
    public String getCategoriesAsString();
351
    
352
    public void addCategoriesAsString(String categoriesString);
353
    
354
}