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

History | View | Annotate | Download (8.64 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

    
33
import org.gvsig.installer.lib.api.InstallerManager.ARCH;
34
import org.gvsig.installer.lib.api.InstallerManager.JVM;
35
import org.gvsig.installer.lib.api.InstallerManager.OS;
36
import org.gvsig.installer.lib.api.InstallerManager.STATE;
37
import org.gvsig.tools.lang.Cloneable;
38

    
39
/**
40
 * Information of a package that is used on the installation process.
41
 * This information is composed by next fields:
42
 * </br> <li>
43
 * <lu><b>Code</b>: unique identifier for the package.</lu> <lu><b>Name</b>:
44
 * name of the package.</lu> <lu><b>Description</b>: brief description of the
45
 * package functionality</lu> * <lu><b>Version</b>: number of version.</lu>
46
 * <lu><b>Build</b>: build number.</lu> <lu><b>State</b>: the state of the
47
 * package (testing, RC1...).</lu> <lu><b>Operating system</b>: the operating
48
 * system supported (lin, win, mac_10_6, ...).</lu> <lu><b>Architecture</b>: the
49
 * state of the package (testing, RC1, ...).</lu> <lu><b>JavaVM</b>: the minimum
50
 * java version supported (1.5, 1.6, ...).</lu> <lu><b>Is Official</b>: if the
51
 * package is official or if is a not official package.</lu> <lu><b>Type</b>:
52
 * package type (plugin, theme, translation...). Depending of this value a
53
 * different installation provider is selected to control the installation
54
 * process.</lu> <li>
55
 * 
56
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
57
 */
58
public interface PackageInfo extends Cloneable {
59

    
60
    /**
61
     * @return
62
     *         Gets the code of the package.
63
     */
64
    public String getCode();
65

    
66
    public void setCode(String code);
67

    
68
    /**
69
     * @return
70
     *         Gets the name of the package.
71
     */
72
    public String getName();
73

    
74
    public void setName(String name);
75

    
76
    /**
77
     * @return
78
     *         Gets the description of the package.
79
     */
80
    public String getDescription();
81

    
82
    public void setDescription(String description);
83

    
84
    /**
85
     * @return
86
     *         Gets the version of the package.
87
     */
88
    public String getVersion();
89

    
90
    public void setVersion(String version);
91

    
92
    /**
93
     * @return
94
     *         Gets the build number of the package.
95
     */
96
    public int getBuild();
97

    
98
    public void setBuild(int build);
99

    
100
    /**
101
     * @return
102
     *         Gets the state of the package.
103
     * @see STATE
104
     */
105
    public String getState();
106

    
107
    /**
108
     * Sets the state of the package
109
     * 
110
     * @param state
111
     * @see STATE
112
     */
113
    public void setState(String state);
114

    
115
    /**
116
     * @return
117
     *         Gets if the package is official.
118
     */
119
    public boolean isOfficial();
120

    
121
    public void setOfficial(boolean official);
122

    
123
    /**
124
     * @return
125
     *         Gets the type of the package.
126
     */
127
    public String getType();
128

    
129
    public void setType(String type);
130

    
131
    /**
132
     * Returns the supported operating system.
133
     * 
134
     * @return the supported operating system
135
     * @see OS
136
     */
137
    public String getOperatingSystem();
138

    
139
    /**
140
     * Sets the supported operating system.
141
     * 
142
     * @param operatingSystem
143
     *            the supported operating system
144
     * @see OS
145
     */
146
    public void setOperatingSystem(String operatingSystem);
147

    
148
    /**
149
     * Returns the supported hardware architecture.
150
     * 
151
     * @return the supported hardware architecture
152
     * @see ARCH
153
     */
154
    public String getArchitecture();
155

    
156
    /**
157
     * Sets the supported hardware architecture.
158
     * 
159
     * @param architecture
160
     *            the supported hardware architecture
161
     * @see ARCH
162
     */
163
    public void setArchitecture(String architecture);
164

    
165
    /**
166
     * Returns the supported java vm version.
167
     * 
168
     * @return the supported java vm version
169
     * @see JVM
170
     */
171
    public String getJavaVM();
172

    
173
    /**
174
     * Sets the supported java vm version.
175
     * 
176
     * @param javaVM
177
     *            the supported java vm version
178
     * @see JVM
179
     */
180
    public void setJavaVM(String javaVM);
181

    
182
    /**
183
     * Returns the supported gvSIG version.
184
     * 
185
     * @return the supported gvSIG version
186
     */
187
    public String getGvSIGVersion();
188

    
189
    /**
190
     * Sets the supported gvSIG version.
191
     * 
192
     * @param gvSIGVersion
193
     *            the supported gvSIG version
194
     */
195
    public void setGvSIGVersion(String gvSIGVersion);
196

    
197
    /**
198
     * Returns the package bundle download {@link URL}.
199
     * 
200
     * May be null if there is no remote URL to download the bundle.
201
     * 
202
     * @return the package bundle download {@link URL}
203
     */
204
    public URL getDownloadURL();
205

    
206
    /**
207
     * Sets the package bundle download {@link URL}. Optional.
208
     * 
209
     * @param defaultURL
210
     *            the package bundle download {@link URL}
211
     */
212
    public void setDownloadURL(URL defaultURL);
213

    
214
    /**
215
     * Returns the package info model version.
216
     * 
217
     * @return the package info model version
218
     */
219
    public String getModelVersion();
220

    
221
    /**
222
     * Sets the package info model version.
223
     * 
224
     * @param modelVersion
225
     *            the package info model version
226
     */
227
    public void setModelVersion(String modelVersion);
228

    
229
    /**
230
     * Add an external file that have to be copied in the
231
     * installation process.
232
     * 
233
     * @param file
234
     *            The file to copy.
235
     * @deprecated
236
     *             This method will be deleted on next releases because
237
     *             all the files that a plugin needs to work should be
238
     *             contained in its directory.
239
     */
240
    @Deprecated
241
    public void addFileToCopy(File file);
242

    
243
    /**
244
     * Gets one external file that is copied on
245
     * the installation process.
246
     * 
247
     * @param index
248
     *            The position of the external file.
249
     * @return
250
     *         The file that have to be copied.
251
     * @deprecated
252
     *             This method will be deleted on next releases because
253
     *             all the files that a plugin needs to work should be
254
     *             contained in its directory.
255
     */
256
    @Deprecated
257
    public File getFileToCopyAt(int index);
258

    
259
    /**
260
     * Gest the number of external files that have to be
261
     * copied in the installation process.
262
     * 
263
     * @return
264
     *         The number of files.
265
     * @deprecated
266
     *             This method will be deleted on next releases because
267
     *             all the files that a plugin needs to work should be
268
     *             contained in its directory.
269
     */
270
    @Deprecated
271
    public int getFileToCopySize();
272

    
273
    /**
274
     * Removes one of the files that have to be copied in the
275
     * installation process.
276
     * 
277
     * @param index
278
     *            the position of the file.
279
     * @deprecated
280
     *             This method will be deleted on next releases because
281
     *             all the files that a package needs to work should be
282
     *             contained in its directory.
283
     */
284
    @Deprecated
285
    public void removeFileToCopy(int index);
286

    
287
    /**
288
     * Sets the ant script that can be executed in the
289
     * installation process.
290
     * 
291
     * @param antScript
292
     *            The ant script to copy.
293
     * @deprecated
294
     *             This method will be deleted on next releases because
295
     *             all the files that a package needs to work should be
296
     *             contained in its directory.
297
     */
298
    @Deprecated
299
    public void setAnScript(String antScript);
300

    
301
    /**
302
     * Gets the ant script that has to be executed in the
303
     * installation process.
304
     * 
305
     * @return
306
     *         the script.
307
     * @deprecated
308
     *             This method will be deleted on next releases because
309
     *             all the files that a package needs to work should be
310
     *             contained in its directory.
311
     */
312
    @Deprecated
313
    public String getAntScript();
314

    
315
}