svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.lib / org.gvsig.installer.lib.impl / src / main / java / org / gvsig / installer / lib / impl / DefaultPackageInfo.java @ 34005
History | View | Annotate | Download (4.84 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.impl; |
29 |
|
30 |
import java.io.File; |
31 |
import java.net.URL; |
32 |
import java.util.ArrayList; |
33 |
import java.util.List; |
34 |
|
35 |
import org.gvsig.installer.lib.api.InstallerManager.ARCH; |
36 |
import org.gvsig.installer.lib.api.InstallerManager.JVM; |
37 |
import org.gvsig.installer.lib.api.InstallerManager.OS; |
38 |
import org.gvsig.installer.lib.api.InstallerManager.STATE; |
39 |
import org.gvsig.installer.lib.api.PackageInfo; |
40 |
|
41 |
/**
|
42 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
43 |
*/
|
44 |
public class DefaultPackageInfo implements PackageInfo { |
45 |
|
46 |
private String code = null; |
47 |
private String name = null; |
48 |
private String description = null; |
49 |
private String version = "0.0.1"; |
50 |
private int build = 0; |
51 |
private boolean official; |
52 |
private List<File> selectedFiles = null; |
53 |
private String antScript = null; |
54 |
private String type = null; |
55 |
|
56 |
private String state = STATE.DEVEL; |
57 |
private String operatingSystem = OS.ALL; |
58 |
private String architecture = ARCH.ALL; |
59 |
private String javaVM = JVM.J1_5; |
60 |
|
61 |
private String gvSIGVersion; |
62 |
|
63 |
private URL defaultDownloadURL = null; |
64 |
|
65 |
private String modelVersion = "1.0.0"; |
66 |
|
67 |
public DefaultPackageInfo() {
|
68 |
super();
|
69 |
selectedFiles = new ArrayList<File>(); |
70 |
} |
71 |
|
72 |
public String getCode() { |
73 |
return code;
|
74 |
} |
75 |
|
76 |
public String getName() { |
77 |
return name;
|
78 |
} |
79 |
|
80 |
public String getDescription() { |
81 |
return description;
|
82 |
} |
83 |
|
84 |
public String getVersion() { |
85 |
return version;
|
86 |
} |
87 |
|
88 |
public int getBuild() { |
89 |
return build;
|
90 |
} |
91 |
|
92 |
public String getState() { |
93 |
return state;
|
94 |
} |
95 |
|
96 |
public boolean isOfficial() { |
97 |
return official;
|
98 |
} |
99 |
|
100 |
public void setCode(String code) { |
101 |
this.code = code;
|
102 |
} |
103 |
|
104 |
public void setName(String name) { |
105 |
this.name = name;
|
106 |
} |
107 |
|
108 |
public void setDescription(String description) { |
109 |
this.description = description;
|
110 |
} |
111 |
|
112 |
public void setVersion(String version) { |
113 |
this.version = version;
|
114 |
} |
115 |
|
116 |
public void setBuild(int build) { |
117 |
this.build = build;
|
118 |
} |
119 |
|
120 |
public void setState(String state) { |
121 |
this.state = state;
|
122 |
} |
123 |
|
124 |
public void setOfficial(boolean official) { |
125 |
this.official = official;
|
126 |
} |
127 |
|
128 |
public String getOperatingSystem() { |
129 |
return operatingSystem;
|
130 |
} |
131 |
|
132 |
public void setOperatingSystem(String operatingSystem) { |
133 |
this.operatingSystem = operatingSystem;
|
134 |
} |
135 |
|
136 |
public String getArchitecture() { |
137 |
return architecture;
|
138 |
} |
139 |
|
140 |
public void setArchitecture(String architecture) { |
141 |
this.architecture = architecture;
|
142 |
} |
143 |
|
144 |
public String getJavaVM() { |
145 |
return javaVM;
|
146 |
} |
147 |
|
148 |
public void setJavaVM(String javaVM) { |
149 |
this.javaVM = javaVM;
|
150 |
} |
151 |
|
152 |
public void addFileToCopy(File file) { |
153 |
selectedFiles.add(file); |
154 |
} |
155 |
|
156 |
public File getFileToCopyAt(int index) { |
157 |
return selectedFiles.get(index);
|
158 |
} |
159 |
|
160 |
public int getFileToCopySize() { |
161 |
return selectedFiles.size();
|
162 |
} |
163 |
|
164 |
public void removeFileToCopy(int index) { |
165 |
selectedFiles.remove(index); |
166 |
} |
167 |
|
168 |
public String getAntScript() { |
169 |
return antScript;
|
170 |
} |
171 |
|
172 |
public void setAnScript(String antScript) { |
173 |
this.antScript = antScript;
|
174 |
} |
175 |
|
176 |
public String getType() { |
177 |
return type;
|
178 |
} |
179 |
|
180 |
public void setType(String type) { |
181 |
this.type = type;
|
182 |
} |
183 |
|
184 |
public String getGvSIGVersion() { |
185 |
return gvSIGVersion;
|
186 |
} |
187 |
|
188 |
public void setGvSIGVersion(String gvSIGVersion) { |
189 |
this.gvSIGVersion = gvSIGVersion;
|
190 |
} |
191 |
|
192 |
public URL getDownloadURL() { |
193 |
return defaultDownloadURL;
|
194 |
} |
195 |
|
196 |
public void setDownloadURL(URL defaultDownloadURL) { |
197 |
this.defaultDownloadURL = defaultDownloadURL;
|
198 |
} |
199 |
|
200 |
public String getModelVersion() { |
201 |
return modelVersion;
|
202 |
} |
203 |
|
204 |
public void setModelVersion(String modelVersion) { |
205 |
this.modelVersion = modelVersion;
|
206 |
} |
207 |
|
208 |
} |