svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.impl / src / main / java / org / gvsig / installer / swing / impl / DefaultSwingInstallerManager.java @ 42685
History | View | Annotate | Download (15.6 KB)
1 | 40560 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40435 | jjdelcerro | *
|
4 | 40560 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | *
|
||
6 | 40435 | jjdelcerro | * This program is free software; you can redistribute it and/or
|
7 | * modify it under the terms of the GNU General Public License
|
||
8 | 40560 | jjdelcerro | * as published by the Free Software Foundation; either version 3
|
9 | 40435 | jjdelcerro | * of the License, or (at your option) any later version.
|
10 | 40560 | jjdelcerro | *
|
11 | 40435 | jjdelcerro | * 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 | 40560 | jjdelcerro | *
|
16 | 40435 | jjdelcerro | * 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 | 40560 | jjdelcerro | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 | 40435 | jjdelcerro | * MA 02110-1301, USA.
|
20 | 40560 | jjdelcerro | *
|
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 | 40435 | jjdelcerro | */
|
24 | /*
|
||
25 | * AUTHORS (In addition to CIT):
|
||
26 | * 2010 {Prodevelop} {Task}
|
||
27 | */
|
||
28 | |||
29 | package org.gvsig.installer.swing.impl; |
||
30 | |||
31 | import java.io.BufferedReader; |
||
32 | import java.io.File; |
||
33 | import java.io.FileInputStream; |
||
34 | import java.io.FileNotFoundException; |
||
35 | import java.io.IOException; |
||
36 | import java.io.InputStream; |
||
37 | import java.io.InputStreamReader; |
||
38 | import java.net.MalformedURLException; |
||
39 | import java.net.URL; |
||
40 | import java.util.ArrayList; |
||
41 | 40581 | jjdelcerro | import java.util.Collection; |
42 | import java.util.Iterator; |
||
43 | 40435 | jjdelcerro | import java.util.List; |
44 | 40581 | jjdelcerro | import java.util.ListIterator; |
45 | 40435 | jjdelcerro | |
46 | import org.gvsig.i18n.Messages; |
||
47 | import org.gvsig.installer.lib.api.Dependencies; |
||
48 | import org.gvsig.installer.lib.api.InstallerLocator; |
||
49 | import org.gvsig.installer.lib.api.InstallerManager; |
||
50 | import org.gvsig.installer.lib.api.PackageInfo; |
||
51 | import org.gvsig.installer.lib.api.Version; |
||
52 | import org.gvsig.installer.swing.api.JProgressPanel; |
||
53 | import org.gvsig.installer.swing.api.SwingInstallerManager; |
||
54 | import org.gvsig.installer.swing.api.creation.JOutputPanel; |
||
55 | import org.gvsig.installer.swing.api.creation.JPackageInfoPanel; |
||
56 | import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard; |
||
57 | import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException; |
||
58 | import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard; |
||
59 | import org.gvsig.installer.swing.api.execution.InstallPackageWizardException; |
||
60 | import org.gvsig.installer.swing.api.execution.JShowPackageStatusAndAskContinuePanel; |
||
61 | 40634 | jjdelcerro | import org.gvsig.installer.swing.api.execution.JShowPackagesAndAskContinuePanel; |
62 | 40435 | jjdelcerro | import org.gvsig.installer.swing.api.execution.JShowRequiredPackagesAndAskContinuePanel; |
63 | import org.gvsig.installer.swing.api.execution.JShowUnresolvedDependenciesAndAskContinuePanel; |
||
64 | 42534 | jjdelcerro | import org.gvsig.installer.swing.api.packagebuilder.PackageBuildder; |
65 | 40435 | jjdelcerro | import org.gvsig.installer.swing.impl.creation.panel.DefaultOutputPanel; |
66 | import org.gvsig.installer.swing.impl.creation.panel.DefaultPackageInfoPanel; |
||
67 | 42528 | jjdelcerro | import org.gvsig.installer.swing.impl.packagebuilder.BasePackageWizard; |
68 | 40435 | jjdelcerro | import org.gvsig.installer.swing.impl.panel.DefaultProgressPanel; |
69 | import org.gvsig.tools.ToolsLocator; |
||
70 | import org.gvsig.tools.extensionpoint.ExtensionPoint; |
||
71 | import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
||
72 | import org.slf4j.Logger; |
||
73 | import org.slf4j.LoggerFactory; |
||
74 | |||
75 | /**
|
||
76 | * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
||
77 | */
|
||
78 | public class DefaultSwingInstallerManager implements SwingInstallerManager { |
||
79 | |||
80 | 40581 | jjdelcerro | public class DefaultUrlAndLabel implements UrlAndLabel { |
81 | |||
82 | private URL url; |
||
83 | private String label; |
||
84 | |||
85 | public DefaultUrlAndLabel(URL url, String label) { |
||
86 | this.url = url;
|
||
87 | this.label = label;
|
||
88 | } |
||
89 | public URL getURL() { |
||
90 | return this.url; |
||
91 | } |
||
92 | |||
93 | public String getLabel() { |
||
94 | return this.label; |
||
95 | } |
||
96 | |||
97 | public void setLabel(String label) { |
||
98 | this.label = label;
|
||
99 | } |
||
100 | @Override
|
||
101 | public String toString() { |
||
102 | if( label == null ) { |
||
103 | return this.url.toString(); |
||
104 | } |
||
105 | return this.label + " - " + this.url.toString(); |
||
106 | } |
||
107 | } |
||
108 | |||
109 | /**
|
||
110 | *
|
||
111 | * This class is for compatibility with deprecated method
|
||
112 | * List<URL> getDefaultDownloadURLs()
|
||
113 | *
|
||
114 | * @author jjdelcerro
|
||
115 | *
|
||
116 | */
|
||
117 | public class DefaultDownloadURLsIterator<URL> implements ListIterator<URL> { |
||
118 | private List<UrlAndLabel> urlAndLabels; |
||
119 | private ListIterator<UrlAndLabel> it; |
||
120 | |||
121 | DefaultDownloadURLsIterator(List<UrlAndLabel> urlAndLabels, int index) { |
||
122 | this.urlAndLabels = urlAndLabels;
|
||
123 | this.it = this.urlAndLabels.listIterator(index); |
||
124 | } |
||
125 | |||
126 | DefaultDownloadURLsIterator(List<UrlAndLabel> urlAndLabels) {
|
||
127 | this.urlAndLabels = urlAndLabels;
|
||
128 | this.it = this.urlAndLabels.listIterator(); |
||
129 | } |
||
130 | |||
131 | public boolean hasNext() { |
||
132 | return this.it.hasNext(); |
||
133 | } |
||
134 | |||
135 | public URL next() { |
||
136 | UrlAndLabel value = this.it.next();
|
||
137 | if( value == null ) { |
||
138 | return null; |
||
139 | } |
||
140 | return (URL) value.getURL(); |
||
141 | } |
||
142 | |||
143 | public boolean hasPrevious() { |
||
144 | return it.hasPrevious();
|
||
145 | } |
||
146 | |||
147 | public int nextIndex() { |
||
148 | return it.nextIndex();
|
||
149 | } |
||
150 | |||
151 | public URL previous() { |
||
152 | UrlAndLabel value = this.it.previous();
|
||
153 | if( value == null ) { |
||
154 | return null; |
||
155 | } |
||
156 | return (URL) value.getURL(); |
||
157 | } |
||
158 | |||
159 | public int previousIndex() { |
||
160 | return it.previousIndex();
|
||
161 | } |
||
162 | |||
163 | public void remove() { |
||
164 | throw new UnsupportedOperationException("This is read-only"); |
||
165 | } |
||
166 | |||
167 | public void add(Object arg0) { |
||
168 | throw new UnsupportedOperationException("This is read-only"); |
||
169 | } |
||
170 | |||
171 | public void set(Object arg0) { |
||
172 | throw new UnsupportedOperationException("This is read-only"); |
||
173 | } |
||
174 | } |
||
175 | |||
176 | /**
|
||
177 | *
|
||
178 | * This class is for compatibility with deprecated method
|
||
179 | * List<URL> getDefaultDownloadURLs()
|
||
180 | *
|
||
181 | * @author jjdelcerro
|
||
182 | *
|
||
183 | */
|
||
184 | public class DefaultDownloadURLs<URL> implements List<URL> { |
||
185 | |||
186 | private List<UrlAndLabel> urlAndLabels; |
||
187 | |||
188 | DefaultDownloadURLs(List<UrlAndLabel> urlAndLabels) {
|
||
189 | this.urlAndLabels = urlAndLabels;
|
||
190 | } |
||
191 | |||
192 | public boolean add(Object url) { |
||
193 | throw new UnsupportedOperationException("This is a read-only list"); |
||
194 | } |
||
195 | |||
196 | public void add(int arg0, Object url) { |
||
197 | throw new UnsupportedOperationException("This is a read-only list"); |
||
198 | } |
||
199 | |||
200 | public boolean addAll(Collection arg0) { |
||
201 | throw new UnsupportedOperationException("This is a read-only list"); |
||
202 | } |
||
203 | |||
204 | public boolean addAll(int arg0, Collection arg1) { |
||
205 | throw new UnsupportedOperationException("This is a read-only list"); |
||
206 | } |
||
207 | |||
208 | public void clear() { |
||
209 | throw new UnsupportedOperationException("This is a read-only list"); |
||
210 | } |
||
211 | |||
212 | public boolean contains(Object arg0) { |
||
213 | Iterator<UrlAndLabel> it = this.urlAndLabels.iterator(); |
||
214 | while( it.hasNext() ) {
|
||
215 | UrlAndLabel x = it.next(); |
||
216 | if( x.getURL().equals(arg0) ) {
|
||
217 | return true; |
||
218 | } |
||
219 | } |
||
220 | return false; |
||
221 | } |
||
222 | |||
223 | public boolean containsAll(Collection arg0) { |
||
224 | throw new UnsupportedOperationException("This method is not supported"); |
||
225 | } |
||
226 | |||
227 | public URL get(int arg0) { |
||
228 | return (URL) this.urlAndLabels.get(arg0).getURL(); |
||
229 | } |
||
230 | |||
231 | public int indexOf(Object arg0) { |
||
232 | for( int i=0; i<this.urlAndLabels.size(); i++) { |
||
233 | if( this.urlAndLabels.get(i).getURL().equals(arg0) ) { |
||
234 | return i;
|
||
235 | } |
||
236 | } |
||
237 | return -1; |
||
238 | } |
||
239 | |||
240 | public boolean isEmpty() { |
||
241 | return this.urlAndLabels.isEmpty(); |
||
242 | } |
||
243 | |||
244 | public Iterator iterator() { |
||
245 | return new DefaultDownloadURLsIterator(this.urlAndLabels); |
||
246 | } |
||
247 | |||
248 | public int lastIndexOf(Object arg0) { |
||
249 | for( int i=this.urlAndLabels.size()-1; i>=0; i--) { |
||
250 | if( this.urlAndLabels.get(i).getURL().equals(arg0) ) { |
||
251 | return i;
|
||
252 | } |
||
253 | } |
||
254 | return -1; |
||
255 | } |
||
256 | |||
257 | public ListIterator listIterator() { |
||
258 | return new DefaultDownloadURLsIterator(this.urlAndLabels); |
||
259 | } |
||
260 | |||
261 | public ListIterator listIterator(int arg0) { |
||
262 | return new DefaultDownloadURLsIterator(this.urlAndLabels, arg0); |
||
263 | } |
||
264 | |||
265 | public boolean remove(Object arg0) { |
||
266 | throw new UnsupportedOperationException("This is a read-only list"); |
||
267 | } |
||
268 | |||
269 | public URL remove(int arg0) { |
||
270 | throw new UnsupportedOperationException("This is a read-only list"); |
||
271 | } |
||
272 | |||
273 | public boolean removeAll(Collection arg0) { |
||
274 | throw new UnsupportedOperationException("This is a read-only list"); |
||
275 | } |
||
276 | |||
277 | public boolean retainAll(Collection arg0) { |
||
278 | throw new UnsupportedOperationException("This is a read-only list"); |
||
279 | } |
||
280 | |||
281 | public Object set(int arg0, Object arg1) { |
||
282 | throw new UnsupportedOperationException("This is a read-only list"); |
||
283 | } |
||
284 | |||
285 | public int size() { |
||
286 | return this.urlAndLabels.size(); |
||
287 | } |
||
288 | |||
289 | public List subList(int arg0, int arg1) { |
||
290 | throw new UnsupportedOperationException("This method is not supported"); |
||
291 | } |
||
292 | |||
293 | public Object[] toArray() { |
||
294 | throw new UnsupportedOperationException("This method is not supported"); |
||
295 | } |
||
296 | |||
297 | public Object[] toArray(Object[] arg0) { |
||
298 | throw new UnsupportedOperationException("This method is not supported"); |
||
299 | } |
||
300 | |||
301 | } |
||
302 | |||
303 | 40435 | jjdelcerro | private static Logger logger = LoggerFactory |
304 | .getLogger(DefaultSwingInstallerManager.class); |
||
305 | |||
306 | private static final String SWING_INSTALLER_MANAGER_EXTENSION_POINT = "SwingInstallerManagerExtensionPoint"; |
||
307 | private static final String CREATE_INSTALLER_WIZARD_NAME = "CreateInstallerWizard"; |
||
308 | private static final String EXECUTE_INSTALLER_WIZARD_NAME = "ExecuteInstallerWizard"; |
||
309 | private ExtensionPointManager extensionPoints = ToolsLocator
|
||
310 | .getExtensionPointManager(); |
||
311 | |||
312 | private String applicationVersion = "1.0.0"; |
||
313 | 40581 | jjdelcerro | private List<UrlAndLabel> defaultDownloadURLs = new ArrayList<UrlAndLabel>(); |
314 | 40435 | jjdelcerro | |
315 | public String getText(String key) { |
||
316 | 40634 | jjdelcerro | return Messages.translate(key);
|
317 | 40435 | jjdelcerro | } |
318 | |||
319 | public void registerMakePluginPackageWizardInstallerCreationWizard( |
||
320 | Class<? extends MakePluginPackageWizard> clazz) { |
||
321 | ExtensionPoint extensionPoint = extensionPoints.add( |
||
322 | SWING_INSTALLER_MANAGER_EXTENSION_POINT, "");
|
||
323 | extensionPoint.append(CREATE_INSTALLER_WIZARD_NAME, "", clazz);
|
||
324 | } |
||
325 | |||
326 | public void registerInstallPackageWizard( |
||
327 | Class<? extends AbstractInstallPackageWizard> clazz) { |
||
328 | ExtensionPoint extensionPoint = extensionPoints.add( |
||
329 | SWING_INSTALLER_MANAGER_EXTENSION_POINT, "");
|
||
330 | extensionPoint.append(EXECUTE_INSTALLER_WIZARD_NAME, "", clazz);
|
||
331 | } |
||
332 | |||
333 | public String getApplicationVersion() { |
||
334 | return applicationVersion;
|
||
335 | } |
||
336 | |||
337 | public void setApplicationVersion(String gvSIGVersion) { |
||
338 | this.applicationVersion = gvSIGVersion;
|
||
339 | } |
||
340 | |||
341 | public URL getDefaultDownloadURL() { |
||
342 | if (defaultDownloadURLs.size() < 1) { |
||
343 | return null; |
||
344 | } |
||
345 | 40581 | jjdelcerro | return defaultDownloadURLs.get(0).getURL(); |
346 | 40435 | jjdelcerro | } |
347 | |||
348 | 40581 | jjdelcerro | public List<URL> getDefaultDownloadURLs() { |
349 | return new DefaultDownloadURLs(this.defaultDownloadURLs); |
||
350 | } |
||
351 | |||
352 | public List<UrlAndLabel> getDefaultDownloadUrlAndLabels() { |
||
353 | return this.defaultDownloadURLs; |
||
354 | } |
||
355 | |||
356 | 40435 | jjdelcerro | public void setDefaultDownloadURL(String defaultDownloadURLs) { |
357 | String[] urls = defaultDownloadURLs.split(";"); |
||
358 | for (int i = 0; i < urls.length; i++) { |
||
359 | try {
|
||
360 | this.addDefaultDownloadURL(urls[i]);
|
||
361 | } catch (MalformedURLException e) { |
||
362 | logger.info("Malformed URL ("+urls[i]+").", e); |
||
363 | } |
||
364 | } |
||
365 | } |
||
366 | |||
367 | public void setDefaultDownloadURL(URL defaultDownloadURL) { |
||
368 | this.defaultDownloadURLs.clear();
|
||
369 | this.addDefaultDownloadURL(defaultDownloadURL);
|
||
370 | } |
||
371 | |||
372 | public void setDefaultDownloadURL(File defaultDownloadURLs) { |
||
373 | 42685 | jjdelcerro | if( defaultDownloadURLs == null || !defaultDownloadURLs.exists() ) { |
374 | return;
|
||
375 | } |
||
376 | 40435 | jjdelcerro | InputStream is;
|
377 | try {
|
||
378 | is = new FileInputStream(defaultDownloadURLs); |
||
379 | } catch (FileNotFoundException e1) { |
||
380 | 42685 | jjdelcerro | logger.warn("Can't open the file " + defaultDownloadURLs.getName(), e1);
|
381 | 40435 | jjdelcerro | return;
|
382 | } |
||
383 | BufferedReader in = new BufferedReader(new InputStreamReader(is)); |
||
384 | String line = null; |
||
385 | try {
|
||
386 | for (line = in.readLine(); line != null; line = in.readLine()) { |
||
387 | try {
|
||
388 | this.addDefaultDownloadURL(line);
|
||
389 | } catch (MalformedURLException e) { |
||
390 | 42685 | jjdelcerro | logger.warn( |
391 | 40435 | jjdelcerro | "Error creating the default packages download URL pointing to "
|
392 | + line, e); |
||
393 | } |
||
394 | } |
||
395 | } catch (IOException e) { |
||
396 | 42685 | jjdelcerro | logger.warn("Error reading the file "
|
397 | 40435 | jjdelcerro | + defaultDownloadURLs.getName(), e); |
398 | } |
||
399 | } |
||
400 | |||
401 | public void addDefaultDownloadURL(URL url) { |
||
402 | 40581 | jjdelcerro | addDefaultDownloadURL(url,null);
|
403 | } |
||
404 | |||
405 | public void addDefaultDownloadURL(URL url, String label) { |
||
406 | Iterator<UrlAndLabel> it = this.defaultDownloadURLs.iterator(); |
||
407 | while( it.hasNext() ) {
|
||
408 | DefaultUrlAndLabel value = (DefaultUrlAndLabel) it.next(); |
||
409 | 41373 | jjdelcerro | // Hacket by jbadia ;)
|
410 | if( value.getURL().toString().equals(url.toString()) ) {
|
||
411 | 40581 | jjdelcerro | if( value.getLabel() == null ) { |
412 | value.setLabel(label); |
||
413 | } |
||
414 | // Already exists the url, don't duplicate.
|
||
415 | return;
|
||
416 | } |
||
417 | 40435 | jjdelcerro | } |
418 | 40581 | jjdelcerro | this.defaultDownloadURLs.add( new DefaultUrlAndLabel(url, label)); |
419 | 40435 | jjdelcerro | } |
420 | |||
421 | public void addDefaultDownloadURL(String url) throws MalformedURLException { |
||
422 | 40581 | jjdelcerro | String label = null; |
423 | |||
424 | if( url.startsWith("#") ) { |
||
425 | return;
|
||
426 | } |
||
427 | 40435 | jjdelcerro | Version version = getInstallerManager().createVersion(); |
428 | String versionFormat = version.getMajor() + "." + version.getMinor() |
||
429 | + "." + version.getRevision();
|
||
430 | 40581 | jjdelcerro | int n = url.indexOf("##"); |
431 | if( n>0 ) { |
||
432 | label = url.substring(n+2);
|
||
433 | url = url.substring(0, n-1); |
||
434 | } |
||
435 | 40435 | jjdelcerro | url = url.replace("$version", versionFormat);
|
436 | url = url.replace("<%Version%>", versionFormat);
|
||
437 | url = url.replace("$build", Integer.toString(version.getBuild())); |
||
438 | url = url.replace("<%Build%>", Integer.toString(version.getBuild())); |
||
439 | 40581 | jjdelcerro | addDefaultDownloadURL(new URL(url), label); |
440 | 40435 | jjdelcerro | } |
441 | |||
442 | public InstallerManager getInstallerManager() {
|
||
443 | return InstallerLocator.getInstallerManager();
|
||
444 | } |
||
445 | |||
446 | public JShowPackageStatusAndAskContinuePanel createJShowPackageStatusAndAskContinuePanel(
|
||
447 | List<PackageInfo> packages, String message) { |
||
448 | return new DefaultJShowPackageStatusAndAskContinuePanel(this, packages, |
||
449 | message); |
||
450 | } |
||
451 | |||
452 | 40634 | jjdelcerro | public JShowPackagesAndAskContinuePanel createJShowTroubledPackagesAndAskContinuePanel(
|
453 | List<PackageInfo> packages, String message) { |
||
454 | return new DefaultJShowTroubledPackagesAndAskContinuePanel(this, packages, |
||
455 | message); |
||
456 | } |
||
457 | |||
458 | 40435 | jjdelcerro | public JShowRequiredPackagesAndAskContinuePanel createJShowRequiredPackagesAndAskContinuePanel(
|
459 | List<PackageInfo> packages, String message) { |
||
460 | return new DefaultJShowRequiredPackagesAndAskContinuePanel(this, |
||
461 | packages, message); |
||
462 | } |
||
463 | |||
464 | public JShowUnresolvedDependenciesAndAskContinuePanel createJShowUnresolvedDependenciesAndAskContinuePanel(
|
||
465 | Dependencies dependencies, String message) {
|
||
466 | return new DefaultJShowUnresolvedDependenciesAndAskContinuePanel(this, |
||
467 | dependencies, message); |
||
468 | } |
||
469 | |||
470 | public JPackageInfoPanel createPackageInfoPanel() {
|
||
471 | return new DefaultPackageInfoPanel(); |
||
472 | } |
||
473 | |||
474 | 42534 | jjdelcerro | public JPackageInfoPanel createPackageInfoPanel(String packageType) { |
475 | return new DefaultPackageInfoPanel(packageType); |
||
476 | } |
||
477 | |||
478 | 40435 | jjdelcerro | public JOutputPanel createOutputPanel() {
|
479 | return new DefaultOutputPanel(); |
||
480 | } |
||
481 | |||
482 | public JProgressPanel createProgressPanel() {
|
||
483 | return new DefaultProgressPanel(); |
||
484 | } |
||
485 | |||
486 | public AbstractInstallPackageWizard createInstallPackageWizard(
|
||
487 | File applicationDirectory, File installFolder) |
||
488 | throws InstallPackageWizardException {
|
||
489 | ExtensionPoint ep = extensionPoints |
||
490 | .add(SWING_INSTALLER_MANAGER_EXTENSION_POINT); |
||
491 | try {
|
||
492 | Object[] args = new Object[2]; |
||
493 | args[0] = applicationDirectory;
|
||
494 | args[1] = installFolder;
|
||
495 | return (AbstractInstallPackageWizard) ep.create(
|
||
496 | EXECUTE_INSTALLER_WIZARD_NAME, args); |
||
497 | |||
498 | } catch (Exception e) { |
||
499 | throw new InstallPackageWizardException( |
||
500 | "Error creating the wizard", e);
|
||
501 | } |
||
502 | } |
||
503 | |||
504 | public MakePluginPackageWizard createMakePluginPackageWizard(
|
||
505 | File applicationDirectory, File installFolder) |
||
506 | throws MakePluginPackageWizardException {
|
||
507 | ExtensionPoint ep = extensionPoints |
||
508 | .add(SWING_INSTALLER_MANAGER_EXTENSION_POINT); |
||
509 | try {
|
||
510 | Object[] args = new Object[2]; |
||
511 | args[0] = applicationDirectory;
|
||
512 | args[1] = installFolder;
|
||
513 | return (MakePluginPackageWizard) ep.create(
|
||
514 | CREATE_INSTALLER_WIZARD_NAME, args); |
||
515 | } catch (Exception e) { |
||
516 | throw new MakePluginPackageWizardException( |
||
517 | "Error creating the wizard", e);
|
||
518 | } |
||
519 | } |
||
520 | |||
521 | 42534 | jjdelcerro | @Override
|
522 | public PackageBuildder createPackagerPanel(String packageType, File selectionFolder, File outputFolder) { |
||
523 | PackageBuildder packager = new BasePackageWizard(packageType, selectionFolder, outputFolder);
|
||
524 | 42528 | jjdelcerro | return packager;
|
525 | } |
||
526 | 40435 | jjdelcerro | } |