Statistics
| Revision:

svn-gvsig-desktop / tags / v2_0_0_Build_2021 / extensions / org.gvsig.installer / org.gvsig.installer.lib / org.gvsig.installer.lib.api / src / main / java / org / gvsig / installer / lib / api / PackageInfo.java @ 34107

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

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

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

    
65
    public void setCode(String code);
66

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

    
73
    public void setName(String name);
74

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

    
81
    public void setDescription(String description);
82

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

    
89
    public void setVersion(String version);
90

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

    
97
    public void setBuild(int build);
98

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

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

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

    
120
    public void setOfficial(boolean official);
121

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

    
128
    public void setType(String type);
129

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
314
}