Revision 41892
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.installer.swing.api.SwingInstallerLibrary |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/SwingInstallerLibrary.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2010 {Prodevelop} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api; |
|
30 |
|
|
31 |
import org.gvsig.installer.lib.api.InstallerLibrary; |
|
32 |
import org.gvsig.tools.library.AbstractLibrary; |
|
33 |
import org.gvsig.tools.library.LibraryException; |
|
34 |
|
|
35 |
/** |
|
36 |
* Library for the swing installer. |
|
37 |
* |
|
38 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
39 |
*/ |
|
40 |
public class SwingInstallerLibrary extends AbstractLibrary { |
|
41 |
|
|
42 |
@Override |
|
43 |
public void doRegistration() { |
|
44 |
registerAsAPI(SwingInstallerLibrary.class); |
|
45 |
require(InstallerLibrary.class); |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
protected void doInitialize() throws LibraryException { |
|
50 |
// TODO Auto-generated method stub |
|
51 |
|
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
protected void doPostInitialize() throws LibraryException { |
|
56 |
// TODO Auto-generated method stub |
|
57 |
|
|
58 |
} |
|
59 |
|
|
60 |
} |
|
0 | 61 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/JProgressPanel.java | ||
---|---|---|
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 3 |
|
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 |
package org.gvsig.installer.swing.api; |
|
25 |
|
|
26 |
import javax.swing.JPanel; |
|
27 |
|
|
28 |
import org.gvsig.tools.task.TaskStatus; |
|
29 |
|
|
30 |
/** |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
* |
|
34 |
*/ |
|
35 |
public abstract class JProgressPanel extends JPanel { |
|
36 |
|
|
37 |
public abstract void bind(TaskStatus taskStatus); |
|
38 |
|
|
39 |
public abstract void showErrorMessage(String msg, Throwable ex); |
|
40 |
|
|
41 |
} |
|
0 | 42 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/SwingInstallerManager.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2010 {Prodevelop} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api; |
|
30 |
|
|
31 |
import java.io.File; |
|
32 |
import java.net.MalformedURLException; |
|
33 |
import java.net.URL; |
|
34 |
import java.util.List; |
|
35 |
|
|
36 |
import javax.swing.JPanel; |
|
37 |
|
|
38 |
import org.gvsig.installer.lib.api.InstallerManager; |
|
39 |
import org.gvsig.installer.lib.api.PackageInfo; |
|
40 |
import org.gvsig.installer.swing.api.creation.JOutputPanel; |
|
41 |
import org.gvsig.installer.swing.api.creation.JPackageInfoPanel; |
|
42 |
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard; |
|
43 |
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException; |
|
44 |
import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard; |
|
45 |
import org.gvsig.installer.swing.api.execution.InstallPackageWizardException; |
|
46 |
import org.gvsig.installer.swing.api.execution.JShowPackageStatusAndAskContinuePanel; |
|
47 |
import org.gvsig.installer.swing.api.execution.JShowPackagesAndAskContinuePanel; |
|
48 |
|
|
49 |
/** |
|
50 |
* |
|
51 |
* <p> |
|
52 |
* This manager is used to register and create the wizards that are used to |
|
53 |
* create and execute an installer. These wizards are classes that inherit of |
|
54 |
* {@link JPanel}. |
|
55 |
* </p> |
|
56 |
* |
|
57 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
58 |
*/ |
|
59 |
public interface SwingInstallerManager { |
|
60 |
|
|
61 |
|
|
62 |
public interface UrlAndLabel { |
|
63 |
/** |
|
64 |
* Return the url. |
|
65 |
* |
|
66 |
* @return the url |
|
67 |
*/ |
|
68 |
public URL getURL(); |
|
69 |
|
|
70 |
/** |
|
71 |
* Return the url associated to the url or null |
|
72 |
* if the url don't have a label. |
|
73 |
* |
|
74 |
* @return the label or null |
|
75 |
*/ |
|
76 |
public String getLabel(); |
|
77 |
|
|
78 |
/** |
|
79 |
* Return a string with the label and the url like: |
|
80 |
* "label - http://..." |
|
81 |
* |
|
82 |
* @return the label and url |
|
83 |
*/ |
|
84 |
public String toString(); // Return "label - url" |
|
85 |
} |
|
86 |
|
|
87 |
/** |
|
88 |
* Registers a class that implements a wizard to create an installer of a |
|
89 |
* plugin from a gvSIG installation directory. |
|
90 |
* |
|
91 |
* @param clazz |
|
92 |
* Class that inherits of the {@link MakePluginPackageWizard} |
|
93 |
* abstract class. |
|
94 |
*/ |
|
95 |
public void registerMakePluginPackageWizardInstallerCreationWizard( |
|
96 |
Class<? extends MakePluginPackageWizard> clazz); |
|
97 |
|
|
98 |
/** |
|
99 |
* This method returns a class that is used to create an installer from a |
|
100 |
* gvSIG installation directory. |
|
101 |
* |
|
102 |
* @return The wizard to create an installer. |
|
103 |
* @throws MakePluginPackageWizardException |
|
104 |
* If there is a problem creating the wizard. |
|
105 |
*/ |
|
106 |
public MakePluginPackageWizard createMakePluginPackageWizard( |
|
107 |
File applicationDirectory, File installFolder) |
|
108 |
throws MakePluginPackageWizardException; |
|
109 |
|
|
110 |
/** |
|
111 |
* Registers a class that implements a wizard to execte an installer to |
|
112 |
* install a set of plugins in a gvSIG installation directory. |
|
113 |
* |
|
114 |
* @param clazz |
|
115 |
* Class that inherits of the |
|
116 |
* {@link AbstractInstallPackageWizard} abstract class. |
|
117 |
*/ |
|
118 |
public void registerInstallPackageWizard( |
|
119 |
Class<? extends AbstractInstallPackageWizard> clazz); |
|
120 |
|
|
121 |
/** |
|
122 |
* This method returns a class that is used to execute an installer to |
|
123 |
* install a set of plugins in a gvSIG installation directory. |
|
124 |
* |
|
125 |
* @return The wizard to execute an installer. |
|
126 |
* @throws InstallPackageWizardException |
|
127 |
* If there is a problem creating the wizard. |
|
128 |
*/ |
|
129 |
public AbstractInstallPackageWizard createInstallPackageWizard( |
|
130 |
File applicationDirectory, File installFolder) |
|
131 |
throws InstallPackageWizardException; |
|
132 |
|
|
133 |
/** |
|
134 |
* Returns the current application version. |
|
135 |
* |
|
136 |
* @return the current application version |
|
137 |
*/ |
|
138 |
public String getApplicationVersion(); |
|
139 |
|
|
140 |
/** |
|
141 |
* Sets the current application version. |
|
142 |
* |
|
143 |
* @param gvSIGVersion |
|
144 |
* the current application version |
|
145 |
*/ |
|
146 |
public void setApplicationVersion(String gvSIGVersion); |
|
147 |
|
|
148 |
/** |
|
149 |
* Returns the default URL to download packages from. |
|
150 |
* |
|
151 |
* @return the default URL to download packages from |
|
152 |
*/ |
|
153 |
public URL getDefaultDownloadURL(); |
|
154 |
|
|
155 |
/** |
|
156 |
* Sets the default URL to download packages from |
|
157 |
* |
|
158 |
* @param defaultDownloadURL |
|
159 |
* the default URL to download packages from |
|
160 |
*/ |
|
161 |
public void setDefaultDownloadURL(URL defaultDownloadURL); |
|
162 |
|
|
163 |
/** |
|
164 |
* Translate a key in a text using the current application language |
|
165 |
* |
|
166 |
* @param key |
|
167 |
* The key to translate |
|
168 |
* @return The translated key |
|
169 |
*/ |
|
170 |
public String getText(String key); |
|
171 |
|
|
172 |
/** |
|
173 |
* Returns a reference to the {@link InstallerManager}. |
|
174 |
* |
|
175 |
* @return a reference to the {@link InstallerManager} |
|
176 |
*/ |
|
177 |
public InstallerManager getInstallerManager(); |
|
178 |
|
|
179 |
public JShowPackageStatusAndAskContinuePanel createJShowPackageStatusAndAskContinuePanel( |
|
180 |
List<PackageInfo> packages, String message); |
|
181 |
|
|
182 |
public JShowPackagesAndAskContinuePanel createJShowTroubledPackagesAndAskContinuePanel( |
|
183 |
List<PackageInfo> packages, String message); |
|
184 |
|
|
185 |
public JPackageInfoPanel createPackageInfoPanel(); |
|
186 |
|
|
187 |
public JOutputPanel createOutputPanel(); |
|
188 |
|
|
189 |
public JProgressPanel createProgressPanel(); |
|
190 |
|
|
191 |
public void setDefaultDownloadURL(String defaultDownloadURLs); |
|
192 |
|
|
193 |
public void setDefaultDownloadURL(File defaultDownloadURLs); |
|
194 |
|
|
195 |
public void addDefaultDownloadURL(URL url); |
|
196 |
|
|
197 |
public void addDefaultDownloadURL(URL url, String label); |
|
198 |
|
|
199 |
public void addDefaultDownloadURL(String url) throws MalformedURLException; |
|
200 |
|
|
201 |
/** |
|
202 |
* Return the list of default URL used to retrieve the package.gvspki |
|
203 |
* |
|
204 |
* @return list of defaults urls |
|
205 |
* @deprecated use getDefaultDownloadUrlAndLabels |
|
206 |
*/ |
|
207 |
public List<URL> getDefaultDownloadURLs(); |
|
208 |
|
|
209 |
/** |
|
210 |
* Return the list of default URL used to retrieve the package.gvspki |
|
211 |
* the list contains the URLs and their labels. |
|
212 |
* |
|
213 |
* @return list of default urls and their labels |
|
214 |
*/ |
|
215 |
public List<UrlAndLabel> getDefaultDownloadUrlAndLabels(); |
|
216 |
} |
|
0 | 217 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/wizard/InstallerWizardPanel.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2010 {Prodevelop} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api.wizard; |
|
30 |
|
|
31 |
import java.util.List; |
|
32 |
|
|
33 |
import org.gvsig.tools.task.CancellableTask; |
|
34 |
|
|
35 |
/** |
|
36 |
* This interface must be implemented by all the wizards. It just have a methods |
|
37 |
* to manage the events that the wizard throws. |
|
38 |
* |
|
39 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
40 |
*/ |
|
41 |
public interface InstallerWizardPanel { |
|
42 |
|
|
43 |
/** |
|
44 |
* @param wizardActionListener |
|
45 |
* sets the listener for the action events. |
|
46 |
*/ |
|
47 |
public void setWizardActionListener( |
|
48 |
InstallerWizardActionListener wizardActionListener); |
|
49 |
|
|
50 |
/** |
|
51 |
* @return the listener for the action events |
|
52 |
*/ |
|
53 |
public InstallerWizardActionListener getWizardActionListener(); |
|
54 |
|
|
55 |
public List<CancellableTask> getCancellableTasks(); |
|
56 |
|
|
57 |
public void addCancellableTask(CancellableTask task); |
|
58 |
|
|
59 |
/** |
|
60 |
* Tells whether this install wizard needs to restart |
|
61 |
* the app after install process has finished |
|
62 |
* |
|
63 |
* @return Whether this install wizard needs to restart |
|
64 |
* the app after install process has finished |
|
65 |
*/ |
|
66 |
public boolean needsToRestartApplicationAfterFinish(); |
|
67 |
} |
|
0 | 68 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/wizard/AbstractInstallerWizard.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2010 {Prodevelop} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api.wizard; |
|
30 |
|
|
31 |
import java.io.File; |
|
32 |
import java.util.ArrayList; |
|
33 |
import java.util.List; |
|
34 |
|
|
35 |
import javax.swing.JPanel; |
|
36 |
|
|
37 |
import org.gvsig.tools.task.CancellableTask; |
|
38 |
|
|
39 |
/** |
|
40 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
41 |
*/ |
|
42 |
public abstract class AbstractInstallerWizard extends JPanel implements |
|
43 |
InstallerWizardPanel { |
|
44 |
|
|
45 |
private static final long serialVersionUID = 5609799260650093733L; |
|
46 |
protected InstallerWizardActionListener wizardActionListener = null; |
|
47 |
private final File applicationFolder; |
|
48 |
private final File installFolder; |
|
49 |
private List<CancellableTask> cancelableTasks; |
|
50 |
|
|
51 |
/** |
|
52 |
* Constructor. |
|
53 |
* |
|
54 |
* @param applicationFolder |
|
55 |
* the main root application folder |
|
56 |
* @param installFolder |
|
57 |
* the default bundle files location folder |
|
58 |
*/ |
|
59 |
public AbstractInstallerWizard(File applicationFolder, File installFolder) { |
|
60 |
super(); |
|
61 |
this.applicationFolder = applicationFolder; |
|
62 |
this.installFolder = installFolder; |
|
63 |
this.cancelableTasks = new ArrayList<CancellableTask>(); |
|
64 |
} |
|
65 |
|
|
66 |
public void addCancellableTask(CancellableTask task) { |
|
67 |
this.cancelableTasks.add(task); |
|
68 |
} |
|
69 |
|
|
70 |
public List<CancellableTask> getCancellableTasks() { |
|
71 |
return this.cancelableTasks; |
|
72 |
} |
|
73 |
|
|
74 |
public void setWizardActionListener( |
|
75 |
InstallerWizardActionListener wizardActionListener) { |
|
76 |
this.wizardActionListener = wizardActionListener; |
|
77 |
} |
|
78 |
|
|
79 |
public InstallerWizardActionListener getWizardActionListener() { |
|
80 |
return wizardActionListener; |
|
81 |
} |
|
82 |
|
|
83 |
public File getApplicationFolder() { |
|
84 |
return applicationFolder; |
|
85 |
} |
|
86 |
|
|
87 |
public File getInstallFolder() { |
|
88 |
return installFolder; |
|
89 |
} |
|
90 |
|
|
91 |
public boolean needsToRestartApplicationAfterFinish() { |
|
92 |
// false by default |
|
93 |
// to be overriden by subclasses |
|
94 |
return false; |
|
95 |
} |
|
96 |
} |
|
0 | 97 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/wizard/InstallerWizardActionListener.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2010 {Prodevelop} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api.wizard; |
|
30 |
|
|
31 |
/** |
|
32 |
* <p> |
|
33 |
* Listener for the wizards used on the installation management. It controls the |
|
34 |
* events thrown by the wizard. |
|
35 |
* </p> |
|
36 |
* |
|
37 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
38 |
*/ |
|
39 |
public interface InstallerWizardActionListener { |
|
40 |
|
|
41 |
public void finish(InstallerWizardPanel installerWizard); |
|
42 |
|
|
43 |
public void cancel(InstallerWizardPanel installerWizard); |
|
44 |
} |
|
0 | 45 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/AbstractInstallPackageWizard.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2010 {Prodevelop} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api.execution; |
|
30 |
|
|
31 |
import java.io.File; |
|
32 |
import java.util.List; |
|
33 |
|
|
34 |
import org.gvsig.installer.lib.api.PackageInfo; |
|
35 |
import org.gvsig.installer.lib.api.execution.InstallPackageService; |
|
36 |
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException; |
|
37 |
import org.gvsig.installer.swing.api.wizard.AbstractInstallerWizard; |
|
38 |
|
|
39 |
/** |
|
40 |
* <p> |
|
41 |
* Wizard that is used to open a bundle file to install one or more packages in |
|
42 |
* a valid gvSIG directory. This class receive a directory where gvSIG is |
|
43 |
* installed and it allows to select from the user interface the packages to |
|
44 |
* install. |
|
45 |
* </p> |
|
46 |
* <p> |
|
47 |
* All the classes that inherit if this abstract class have to have a |
|
48 |
* constructor with an argument of type {@link File}, that is the application |
|
49 |
* directory. |
|
50 |
* </p> |
|
51 |
* |
|
52 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
53 |
*/ |
|
54 |
public abstract class AbstractInstallPackageWizard extends |
|
55 |
AbstractInstallerWizard { |
|
56 |
|
|
57 |
private static final long serialVersionUID = -758246118332926598L; |
|
58 |
|
|
59 |
/** |
|
60 |
* Constructor |
|
61 |
* |
|
62 |
* @see AbstractInstallerWizard#AbstractInstallerWizard(File, File) |
|
63 |
*/ |
|
64 |
public AbstractInstallPackageWizard(File applicationFolder, |
|
65 |
File installFolder) { |
|
66 |
super(applicationFolder, installFolder); |
|
67 |
} |
|
68 |
|
|
69 |
/** |
|
70 |
* If this method is selected the first window of the wizard is not visible |
|
71 |
* and the installation process takes the installers form the default |
|
72 |
* directory. |
|
73 |
* |
|
74 |
* @throws InstallPackageServiceException |
|
75 |
* if there an error reading the default directory. |
|
76 |
*/ |
|
77 |
public abstract void installFromDefaultDirectory() |
|
78 |
throws InstallPackageServiceException; |
|
79 |
|
|
80 |
/** |
|
81 |
* @return the installerExecutionService |
|
82 |
*/ |
|
83 |
public abstract InstallPackageService getInstallerExecutionService(); |
|
84 |
|
|
85 |
/** |
|
86 |
* @return the installersToInstall |
|
87 |
*/ |
|
88 |
public abstract List<PackageInfo> getInstallersToInstall(); |
|
89 |
|
|
90 |
public abstract void setNextButtonEnabled(boolean isEnabled); |
|
91 |
|
|
92 |
public abstract void setFinishButtonVisible(boolean isVisible); |
|
93 |
|
|
94 |
public abstract void setCancelButtonEnabled(boolean isEnabled); |
|
95 |
|
|
96 |
public abstract void setBackButtonEnabled(boolean isEnabled); |
|
97 |
|
|
98 |
/** |
|
99 |
* It will ask the user to select the installation mode to Typical or |
|
100 |
* Advanced. |
|
101 |
* |
|
102 |
* @param askIt |
|
103 |
* True or False if the option will be shown to the user or not. |
|
104 |
*/ |
|
105 |
public abstract void setAskTypicalOrCustom(boolean askIt); |
|
106 |
|
|
107 |
/** |
|
108 |
* To know if the question is set to be shown or not. |
|
109 |
* |
|
110 |
* @return True if the question is set to be shown or false if not. |
|
111 |
*/ |
|
112 |
public abstract boolean getAskTypicalOrCustom(); |
|
113 |
|
|
114 |
public abstract void setSelectDefaultPackages(boolean isActivated); |
|
115 |
|
|
116 |
public abstract boolean getSelectDefaultPackages(); |
|
117 |
|
|
118 |
|
|
119 |
public boolean needsToRestartApplicationAfterFinish() { |
|
120 |
// installers need to restart |
|
121 |
return true; |
|
122 |
} |
|
123 |
|
|
124 |
public abstract void setSkipBundleSelection(boolean skipBundleSelection); |
|
125 |
} |
|
0 | 126 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/JShowDependenciesAndAskContinuePanel.java | ||
---|---|---|
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 3 |
|
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 |
package org.gvsig.installer.swing.api.execution; |
|
25 |
|
|
26 |
import javax.swing.JPanel; |
|
27 |
|
|
28 |
public abstract class JShowDependenciesAndAskContinuePanel extends JPanel { |
|
29 |
/** |
|
30 |
* |
|
31 |
*/ |
|
32 |
private static final long serialVersionUID = 6598121113755711664L; |
|
33 |
|
|
34 |
public abstract boolean cancelled(); |
|
35 |
|
|
36 |
public abstract boolean needShow(); |
|
37 |
} |
|
0 | 38 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/JShowUnresolvedDependenciesAndAskContinuePanel.java | ||
---|---|---|
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 3 |
|
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 |
package org.gvsig.installer.swing.api.execution; |
|
25 |
|
|
26 |
|
|
27 |
public abstract class JShowUnresolvedDependenciesAndAskContinuePanel extends JShowDependenciesAndAskContinuePanel { |
|
28 |
|
|
29 |
/** |
|
30 |
* |
|
31 |
*/ |
|
32 |
private static final long serialVersionUID = -6257913354743524479L; |
|
33 |
|
|
34 |
} |
|
0 | 35 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/JShowPackagesAndAskContinuePanel.java | ||
---|---|---|
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 3 |
|
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 |
package org.gvsig.installer.swing.api.execution; |
|
25 |
|
|
26 |
import javax.swing.JPanel; |
|
27 |
|
|
28 |
public abstract class JShowPackagesAndAskContinuePanel extends JPanel { |
|
29 |
/** |
|
30 |
* |
|
31 |
*/ |
|
32 |
private static final long serialVersionUID = 6598121113755711664L; |
|
33 |
|
|
34 |
public abstract boolean cancelled(); |
|
35 |
|
|
36 |
public abstract boolean needShow(); |
|
37 |
} |
|
0 | 38 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/JShowPackageStatusAndAskContinuePanel.java | ||
---|---|---|
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 3 |
|
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 |
package org.gvsig.installer.swing.api.execution; |
|
25 |
|
|
26 |
|
|
27 |
public abstract class JShowPackageStatusAndAskContinuePanel extends JShowPackagesAndAskContinuePanel { |
|
28 |
/** |
|
29 |
* |
|
30 |
*/ |
|
31 |
private static final long serialVersionUID = 6598121113755711664L; |
|
32 |
} |
|
0 | 33 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/JShowRequiredPackagesAndAskContinuePanel.java | ||
---|---|---|
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 3 |
|
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 |
package org.gvsig.installer.swing.api.execution; |
|
25 |
|
|
26 |
import javax.swing.JPanel; |
|
27 |
|
|
28 |
public abstract class JShowRequiredPackagesAndAskContinuePanel extends JShowPackagesAndAskContinuePanel { |
|
29 |
|
|
30 |
/** |
|
31 |
* |
|
32 |
*/ |
|
33 |
private static final long serialVersionUID = -6257913354743524479L; |
|
34 |
} |
|
0 | 35 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/InstallPackageWizardException.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2009 {Iver T.I.} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api.execution; |
|
30 |
|
|
31 |
import org.gvsig.tools.exception.BaseException; |
|
32 |
|
|
33 |
/** |
|
34 |
* Base exception for all the exceptions that are thrown by the process of |
|
35 |
* execution of an installer using the wizard. |
|
36 |
* |
|
37 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
38 |
*/ |
|
39 |
public class InstallPackageWizardException extends BaseException { |
|
40 |
|
|
41 |
private static final long serialVersionUID = -5480466569496849255L; |
|
42 |
private static final String KEY = "installer_execution_exception"; |
|
43 |
|
|
44 |
/** |
|
45 |
* @see BaseException#BaseException(String, Throwable, String, long) |
|
46 |
*/ |
|
47 |
public InstallPackageWizardException(String message, Throwable cause) { |
|
48 |
super(message, cause, KEY, serialVersionUID); |
|
49 |
} |
|
50 |
} |
|
0 | 51 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/creation/JPackageInfoPanel.java | ||
---|---|---|
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 3 |
|
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 |
package org.gvsig.installer.swing.api.creation; |
|
25 |
|
|
26 |
import javax.swing.JPanel; |
|
27 |
|
|
28 |
import org.gvsig.installer.lib.api.PackageInfo; |
|
29 |
|
|
30 |
/** |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
* |
|
34 |
*/ |
|
35 |
public abstract class JPackageInfoPanel extends JPanel { |
|
36 |
|
|
37 |
/** |
|
38 |
* |
|
39 |
*/ |
|
40 |
private static final long serialVersionUID = -3731407272889942912L; |
|
41 |
|
|
42 |
public abstract boolean validatePanel(); |
|
43 |
|
|
44 |
public abstract void panelToPackageInfo(PackageInfo packageInfo); |
|
45 |
|
|
46 |
public abstract void packageInfoToPanel(PackageInfo packageInfo); |
|
47 |
|
|
48 |
} |
|
0 | 49 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/creation/MakePluginPackageWizardException.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2009 {Iver T.I.} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api.creation; |
|
30 |
|
|
31 |
import org.gvsig.tools.exception.BaseException; |
|
32 |
|
|
33 |
/** |
|
34 |
* Base exception for all the exceptions that are thrown by the process of |
|
35 |
* creation of an installer using the wizard. |
|
36 |
* |
|
37 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
38 |
*/ |
|
39 |
public class MakePluginPackageWizardException extends BaseException { |
|
40 |
|
|
41 |
private static final long serialVersionUID = -2058883261679288759L; |
|
42 |
private static final String KEY = "installer_creation_exception"; |
|
43 |
|
|
44 |
/** |
|
45 |
* @see BaseException#BaseException(String, Throwable, String, long) |
|
46 |
*/ |
|
47 |
public MakePluginPackageWizardException(String message, Throwable cause) { |
|
48 |
super(message, cause, KEY, serialVersionUID); |
|
49 |
} |
|
50 |
|
|
51 |
} |
|
0 | 52 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/creation/MakePluginPackageWizard.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2010 {Prodevelop} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api.creation; |
|
30 |
|
|
31 |
import java.io.File; |
|
32 |
|
|
33 |
import org.gvsig.installer.lib.api.PackageInfo; |
|
34 |
import org.gvsig.installer.swing.api.wizard.AbstractInstallerWizard; |
|
35 |
|
|
36 |
/** |
|
37 |
* <p> |
|
38 |
* Wizard that is used to create a bundle with a package of type plugin from a |
|
39 |
* gvSIG directory. This class receive a gvSIG root directory and allows to the |
|
40 |
* user to select the plugin that is used to create the bundle. |
|
41 |
* </p> |
|
42 |
* <p> |
|
43 |
* The user can also set some plugin properties, like the version of the |
|
44 |
* installer, the build number... The definition of all these properties can be |
|
45 |
* found in {@link PackageInfo}. |
|
46 |
* </p> |
|
47 |
* <p> |
|
48 |
* All the classes that inherit if this abstract class have to have a |
|
49 |
* constructor with an argument of type {@link File}, that is the application |
|
50 |
* directory. |
|
51 |
* </p> |
|
52 |
* |
|
53 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
54 |
*/ |
|
55 |
public abstract class MakePluginPackageWizard extends AbstractInstallerWizard { |
|
56 |
|
|
57 |
private static final long serialVersionUID = 6387360455696226183L; |
|
58 |
|
|
59 |
/** |
|
60 |
* Constructor |
|
61 |
* |
|
62 |
* @see AbstractInstallerWizard#AbstractInstallerWizard(File, File) |
|
63 |
*/ |
|
64 |
public MakePluginPackageWizard(File applicationFolder, File installFolder) { |
|
65 |
super(applicationFolder, installFolder); |
|
66 |
} |
|
67 |
} |
|
0 | 68 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/creation/JOutputPanel.java | ||
---|---|---|
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 3 |
|
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 |
package org.gvsig.installer.swing.api.creation; |
|
25 |
|
|
26 |
import java.io.File; |
|
27 |
import java.net.URL; |
|
28 |
|
|
29 |
import javax.swing.JPanel; |
|
30 |
|
|
31 |
import org.gvsig.installer.lib.api.PackageInfo; |
|
32 |
|
|
33 |
/** |
|
34 |
* @author gvSIG Team |
|
35 |
* @version $Id$ |
|
36 |
* |
|
37 |
*/ |
|
38 |
public abstract class JOutputPanel extends JPanel { |
|
39 |
|
|
40 |
/** |
|
41 |
* |
|
42 |
*/ |
|
43 |
private static final long serialVersionUID = 3787670185392301184L; |
|
44 |
|
|
45 |
public abstract File getPackageFile(); |
|
46 |
|
|
47 |
public abstract boolean isCreatePackageIndex(); |
|
48 |
|
|
49 |
public abstract void setCreatePackageIndex(boolean create); |
|
50 |
|
|
51 |
public abstract File getPackageIndexFile(); |
|
52 |
|
|
53 |
public abstract URL getDownloadURL(); |
|
54 |
|
|
55 |
public abstract void setDownloadURL(URL downloadURL); |
|
56 |
|
|
57 |
public abstract void setPackageIndexFile(File packageIndexFile); |
|
58 |
|
|
59 |
public abstract void setPackageFile(File packageFile); |
|
60 |
|
|
61 |
public abstract void setPackageInfo(PackageInfo packageInfo); |
|
62 |
} |
|
0 | 63 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/SwingInstallerLocator.java | ||
---|---|---|
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 3 |
|
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 |
* AUTHORS (In addition to CIT): |
|
26 |
* 2010 {Prodevelop} {Task} |
|
27 |
*/ |
|
28 |
|
|
29 |
package org.gvsig.installer.swing.api; |
|
30 |
|
|
31 |
import org.gvsig.tools.locator.AbstractLocator; |
|
32 |
import org.gvsig.tools.locator.Locator; |
|
33 |
import org.gvsig.tools.locator.LocatorException; |
|
34 |
|
|
35 |
/** |
|
36 |
* This Locator provides the entry point for the gvSIG |
|
37 |
* {@link SwingInstallerManager} |
|
38 |
* |
|
39 |
* @see Locator |
|
40 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
41 |
*/ |
|
42 |
public class SwingInstallerLocator extends AbstractLocator { |
|
43 |
|
|
44 |
private static final String LOCATOR_NAME = "SwingInstallerLocator"; |
|
45 |
/** |
|
46 |
* SwingInstallerManager name used by the locator to access the instance |
|
47 |
*/ |
|
48 |
public static final String SWING_INSTALLER_MANAGER_NAME = "SwingInstallerManager"; |
|
49 |
private static final String SWING_INSTALLER_MANAGER_DESCRIPTION = "SwingInstallerManager of gvSIG"; |
|
50 |
|
|
51 |
/** |
|
52 |
* Unique instance. |
|
53 |
*/ |
|
54 |
private static final SwingInstallerLocator instance = new SwingInstallerLocator(); |
|
55 |
|
|
56 |
/** |
|
57 |
* @see Locator#getLocatorName() |
|
58 |
*/ |
|
59 |
public String getLocatorName() { |
|
60 |
return LOCATOR_NAME; |
|
61 |
} |
|
62 |
|
|
63 |
/** |
|
64 |
* Return a reference to {@link SwingInstallerManager}. |
|
65 |
* |
|
66 |
* @return a reference to SwingInstallerManager |
|
67 |
* @throws LocatorException |
|
68 |
* if there is no access to the class or the class cannot be |
|
69 |
* instantiated |
|
70 |
* @see Locator#get(String) |
|
71 |
*/ |
|
72 |
public static SwingInstallerManager getSwingInstallerManager() |
|
73 |
throws LocatorException { |
|
74 |
return (SwingInstallerManager) getInstance().get( |
|
75 |
SWING_INSTALLER_MANAGER_NAME); |
|
76 |
} |
|
77 |
|
|
78 |
/** |
|
79 |
* Return the singleton instance. |
|
80 |
* |
|
81 |
* @return the singleton instance |
|
82 |
*/ |
|
83 |
public static SwingInstallerLocator getInstance() { |
|
84 |
return instance; |
|
85 |
} |
|
86 |
|
|
87 |
/** |
|
88 |
* Registers the Class implementing the {@link SwingInstallerManager} |
|
89 |
* interface. |
|
90 |
* |
|
91 |
* @param clazz |
|
92 |
* implementing the SwingInstallerManager interface |
|
93 |
*/ |
|
94 |
public static void registerSwingInstallerManager( |
|
95 |
Class<? extends SwingInstallerManager> clazz) { |
|
96 |
getInstance().register(SWING_INSTALLER_MANAGER_NAME, |
|
97 |
SWING_INSTALLER_MANAGER_DESCRIPTION, clazz); |
|
98 |
} |
|
99 |
} |
|
0 | 100 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<artifactId>org.gvsig.installer.swing.api</artifactId> |
|
4 |
<packaging>jar</packaging> |
|
5 |
<name>${project.artifactId}</name> |
|
6 |
<parent> |
|
7 |
<groupId>org.gvsig</groupId> |
|
8 |
<artifactId>org.gvsig.installer.swing</artifactId> |
|
9 |
<version>2.0.73</version> |
|
10 |
</parent> |
|
11 |
<dependencies> |
|
12 |
<dependency> |
|
13 |
<groupId>org.gvsig</groupId> |
|
14 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
15 |
<scope>compile</scope> |
|
16 |
</dependency> |
|
17 |
<dependency> |
|
18 |
<groupId>org.gvsig</groupId> |
|
19 |
<artifactId>org.gvsig.installer.lib.api</artifactId> |
|
20 |
<scope>compile</scope> |
|
21 |
</dependency> |
|
22 |
</dependencies> |
|
23 |
</project> |
|
0 | 24 |
tags/org.gvsig.desktop-2.0.73/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<artifactId>org.gvsig.installer.swing.impl</artifactId> |
|
4 |
<packaging>jar</packaging> |
|
5 |
<name>${project.artifactId}</name> |
|
6 |
<parent> |
|
7 |
<groupId>org.gvsig</groupId> |
|
8 |
<artifactId>org.gvsig.installer.swing</artifactId> |
|
9 |
<version>2.0.73</version> |
|
10 |
</parent> |
|
11 |
<dependencies> |
|
12 |
<!-- |
|
13 |
<dependency> |
|
14 |
<groupId>com.jgoodies</groupId> |
|
15 |
<artifactId>forms</artifactId> |
|
16 |
<scope>compile</scope> |
|
17 |
</dependency> |
|
18 |
--> |
|
19 |
<dependency> |
|
20 |
<groupId>com.jgoodies</groupId> |
|
21 |
<artifactId>jgoodies-forms</artifactId> |
|
22 |
<scope>compile</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
32 |
<scope>compile</scope> |
|
33 |
</dependency> |
|
34 |
<dependency> |
|
35 |
<groupId>org.gvsig</groupId> |
|
36 |
<artifactId>org.gvsig.tools.dynform.api</artifactId> |
|
37 |
<scope>compile</scope> |
|
38 |
</dependency> |
|
39 |
<dependency> |
|
40 |
<groupId>org.gvsig</groupId> |
|
41 |
<artifactId>org.gvsig.i18n</artifactId> |
Also available in: Unified diff