Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.lib / src / main / java / org / gvsig / installer / lib / api / PackageInfo.java @ 1431

History | View | Annotate | Download (9.22 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

    
25
package org.gvsig.installer.lib.api;
26

    
27
import java.io.File;
28
import java.net.URL;
29
import java.util.List;
30

    
31
import org.gvsig.tools.exception.BaseException;
32
import org.gvsig.tools.lang.Cloneable;
33
import org.gvsig.tools.task.SimpleTaskStatus;
34
import org.gvsig.tools.packageutils.StringWithAlias;
35
import org.gvsig.tools.packageutils.PackageManager.ARCH;
36
import org.gvsig.tools.packageutils.PackageManager.JVM;
37
import org.gvsig.tools.packageutils.PackageManager.OS;
38
import org.gvsig.tools.packageutils.PackageManager.STATE;
39

    
40
/**
41
 * @deprecated use instead #org.gvsig.tools.packageutils.PackageInfo
42
 */
43
public interface PackageInfo extends Cloneable{
44

    
45

    
46
        /**
47
         * @return Gets the code of the package.
48
         */
49
        public String getCode();
50

    
51
        public void setCode(String code);
52

    
53
        public StringWithAlias getAllCodes();        
54
    
55
    public boolean hasThisCode(String code);
56
    public boolean hasThisCode(StringWithAlias code);
57
        
58
        
59
        public String getID();
60

    
61
        /**
62
         * @return Gets the name of the package.
63
         */
64
        public String getName();
65

    
66
        public void setName(String name);
67

    
68
        /**
69
         * @return Gets the description of the package.
70
         */
71
        public String getDescription();
72

    
73
        public void setDescription(String description);
74

    
75
        /**
76
         * @return Gets the version of the package.
77
         */
78
        public Version getVersion();
79

    
80
        public void setVersion(Version version);
81

    
82
        /**
83
         * @return Gets the state of the package.
84
         * @see STATE
85
         */
86
        public String getState();
87

    
88
        /**
89
         * Sets the state of the package
90
         * 
91
         * @param state
92
         * @see STATE
93
         */
94
        public void setState(String state);
95

    
96
        /**
97
         * @return Gets if the package is official.
98
         */
99
        public boolean isOfficial();
100

    
101
        public void setOfficial(boolean official);
102

    
103
        /**
104
         * @return Gets the type of the package.
105
         */
106
        public String getType();
107

    
108
        public void setType(String type);
109

    
110
        /**
111
         * Returns the supported operating system.
112
         * 
113
         * @return the supported operating system
114
         * @see OS
115
         */
116
        public String getOperatingSystem();
117

    
118
        /**
119
         * Sets the supported operating system.
120
         * 
121
         * @param operatingSystem
122
         *            the supported operating system
123
         * @see OS
124
         */
125
        public void setOperatingSystem(String operatingSystem);
126
        
127
        public String getOperatingSystemFamily();
128

    
129
        public String getOperatingSystemName();
130

    
131
        public String getOperatingSystemVersion();
132
        
133
        public void setOperatingSystemFamily(String operatingSystemFamily);
134

    
135
        public void setOperatingSystemName(String operatingSystemName);
136

    
137
        public void setOperatingSystemVersion(String operatingSystemVersion);
138
        /**
139
         * Returns the supported hardware architecture.
140
         * 
141
         * @return the supported hardware architecture
142
         * @see ARCH
143
         */
144
        public String getArchitecture();
145

    
146
        /**
147
         * Sets the supported hardware architecture.
148
         * 
149
         * @param architecture
150
         *            the supported hardware architecture
151
         * @see ARCH
152
         */
153
        public void setArchitecture(String architecture);
154

    
155
        /**
156
         * Returns the supported java vm version.
157
         * 
158
         * @return the supported java vm version
159
         * @see JVM
160
         */
161
        public String getJavaVM();
162

    
163
        /**
164
         * Sets the supported java vm version.
165
         * 
166
         * @param javaVM
167
         *            the supported java vm version
168
         * @see JVM
169
         */
170
        public void setJavaVM(String javaVM);
171

    
172
        /**
173
         * Returns the supported application version.
174
         * 
175
         * @return the supported application version
176
         */
177
        public Version getApplicationVersion();
178

    
179
        /**
180
         * Sets the supported application version.
181
         * 
182
         * @param verion
183
         *            the supported application version
184
         */
185
        public void setApplicationVersion(Version version);
186

    
187
        /**
188
         * Returns the package bundle download {@link URL}.
189
         *  
190
         * May be null if there is no remote URL to download the bundle.
191
         * 
192
         * @return the package bundle download {@link URL}
193
         */
194
        public URL getDownloadURL();
195

    
196
        public String getDownloadURLAsString();
197

    
198
        /**
199
         * Sets the package bundle download {@link URL}. Optional.
200
         * 
201
         * @param defaultURL
202
         *            the package bundle download {@link URL}
203
         */
204
        public void setDownloadURL(URL defaultURL);
205

    
206
        public void setDownloadURL(String defaultDownloadURL);
207

    
208
        /**
209
         * Returns the package info model version.
210
         * 
211
         * @return the package info model version
212
         */
213
        public String getModelVersion();
214

    
215
        /**
216
         * Sets the package info model version.
217
         * 
218
         * @param modelVersion
219
         *            the package info model version
220
         */
221
        public void setModelVersion(String modelVersion);
222

    
223
        public String getOwner();
224

    
225
        /**
226
         * Sets the package owner.
227
         * 
228
         * @param owner
229
         *            the package owner
230
         */
231
        public void setOwner(String owner);
232

    
233
        /**
234
         * Returns the owner's url {@link URL}.
235
         * 
236
         * @return the owner's url {@link URL}
237
         */
238
        public URL getOwnerURL();
239

    
240
        /**
241
         * Sets the package owner's url.
242
         * 
243
         * @param sources
244
         *            the package owner's url
245
         */
246
        public void setOwnerURL(URL sources);
247

    
248
        /**
249
         * Returns the package source files url {@link URL}.
250
         * 
251
         * @return the package source files url {@link URL}
252
         */
253
        public URL getSourcesURL();
254

    
255
        /**
256
         * Sets the package sources.
257
         * 
258
         * @param sources
259
         *            the package sources
260
         */
261
        public void setSourcesURL(URL sources);
262

    
263
        /**
264
         * Returns the package web url {@link URL}.
265
         * 
266
         * @return the package web url {@link URL}
267
         */
268
        public URL getWebURL();
269

    
270
        /**
271
         * Sets the package web url {@link URL}.
272
         * 
273
         * @param webURL
274
         *            the package web url {@link URL}
275
         */
276
        public void setWebURL(URL webURL);
277

    
278
        /**
279
         * @param string
280
         * @return
281
         */
282
        public boolean matchID(String string);
283

    
284
        public Dependencies getDependencies();
285

    
286
        public void setDependencies(String dependencies);
287

    
288
        public void setDependencies(Dependencies dependencies);
289

    
290
        public String toStringCompact();
291

    
292
        public List getCategories();
293

    
294
        public void setCategories(List categoriesList);
295

    
296
        public String getCategoriesAsString();
297

    
298
        public void addCategoriesAsString(String categoriesString);
299

    
300
        public boolean isBroken();
301

    
302

    
303

    
304
        
305
        
306
        
307
        
308

    
309
        /**
310
         * 
311
         * @param version
312
         * @deprecated Use {@link #setVersion(Version)}
313
         */
314
        public void setVersion(String version);
315

    
316
        
317
        /**
318
         * @return Gets the build number of the package.
319
         * @deprecated use {@link #getVersion()}.getBuild()
320
         */
321
        public int getBuild();
322

    
323
        /**
324
         * @deprecated use {@link #getVersion()}
325
         */
326
        public void setBuild(int build);
327

    
328
        /**
329
         * Returns the supported gvSIG version.
330
         * 
331
         * @return the supported gvSIG version
332
         * @deprecated use {@link #getApplicationVersion()}
333
         */
334
        public String getGvSIGVersion();
335

    
336
        /**
337
         * Sets the supported gvSIG version.
338
         * 
339
         * @param gvSIGVersion the supported gvSIG version
340
         * @deprecated use {@link #setApplicationVersion(org.gvsig.tools.packageutils.Version)}
341
         */
342
        public void setGvSIGVersion(String gvSIGVersion);
343

    
344

    
345
         /**
346
         * Returns the package bundle download {@link URL}.
347
         *
348
         * May be null if there is no remote URL to download the bundle.
349
         *
350
         * @return the package bundle download {@link URL}
351
         * @deprecated use InstallManager
352
         *
353
         */
354
        public URL getDownloadURL(URL baseURL);
355

    
356
        /**
357
         * Gets the ant script that has to be executed in the installation process.
358
         * 
359
         * @return the script.
360
         * @deprecated use {@link #getPostInstallScript()} 
361
         */
362
        public String getAntScript();
363

    
364
        /**
365
         * Sets the ant script that can be executed in the installation process.
366
         * 
367
         * @param antScript The ant script to copy.
368
         * @deprecated use {@link #setPostInstallScript(String)}
369
         */
370
        public void setAntScript(String antScript);
371

    
372
        /**
373
         * @deprecated use InstallManager
374
         */
375
        public File downloadFile() throws BaseException;
376

    
377
        /**
378
         * @deprecated use InstallManager
379
         */
380
        public File downloadFile(SimpleTaskStatus taskStatus) throws BaseException;
381

    
382
        /**
383
         * @deprecated use InstallManager.getPackageInfoFiles
384
         */
385
        public void addFileToCopy(File file);
386

    
387
        /**
388
         * @deprecated use InstallManager.getPackageInfoFiles
389
         */
390
        public File getFileToCopy(int i);
391

    
392
        /**
393
         * @deprecated use InstallManager.getPackageInfoFiles
394
         */
395
        public void removeFileToCopy(File file);
396

    
397
        /**
398
         * @deprecated use InstallManager.getPackageInfoFiles
399
         */
400
        public void clearFilesToCopy();
401

    
402
        /**
403
         * @deprecated use InstallManager.getPackageInfoFiles
404
         */
405
        public List getFilesToCopy();
406

    
407
        /**
408
         * @deprecated use InstallManager.getPackageInfoFiles
409
         */
410
        public boolean removeInstallFolder(File folder);
411

    
412
        /**
413
         * @deprecated use InstallManager.getPackageInfoFiles
414
         */
415
        public boolean removeFilesFolder(File folder);
416

    
417
        /**
418
         * @deprecated always return true
419
         */
420
        public boolean isSigned();
421

    
422
        /**
423
         * @deprecated do nothing
424
         */
425
        public void checkSignature(byte[] pkgdata);
426

    
427
}