Revision 42135

View differences:

tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.buildtools/src/main/resources/header.txt
1
gvSIG. Desktop Geographic Information System.
2

  
3
Copyright (C) 2007-2013 gvSIG Association.
4
  
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License
7
as published by the Free Software Foundation; either version 3
8
of the License, or (at your option) any later version.
9
  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14
 
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
18
MA  02110-1301, USA.
19

  
20
For any additional information, do not hesitate to contact us 
21
at info AT gvsig.com, or visit our website www.gvsig.com.
0 22

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.buildtools/src/main/resources/gvsig/checkstyle.xml
1
<?xml version="1.0"?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 3
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<!DOCTYPE module PUBLIC
28
    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
29
    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
30

  
31
<!--
32

  
33
  Checkstyle configuration that checks the sun coding conventions from:
34

  
35
    - the Java Language Specification at
36
      http://java.sun.com/docs/books/jls/second_edition/html/index.html
37

  
38
    - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
39

  
40
    - the Javadoc guidelines at
41
      http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
42

  
43
    - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
44

  
45
    - some best practices
46

  
47
  Checkstyle is very configurable. Be sure to read the documentation at
48
  http://checkstyle.sf.net (or in your downloaded distribution).
49

  
50
  Most Checks are configurable, be sure to consult the documentation.
51

  
52
  To completely disable a check, just comment it out or delete it from the file.
53

  
54
  Finally, it is worth reading the documentation.
55

  
56
-->
57

  
58
<module name="Checker">
59
    <!--
60
        If you set the basedir property below, then all reported file
61
        names will be relative to the specified directory. See
62
        http://checkstyle.sourceforge.net/5.x/config.html#Checker
63

  
64
        <property name="basedir" value="${basedir}"/>
65
    -->
66
    <!-- gvSIG: All project files have the ISO-8859-1 charset -->
67
	<property name="charset" value="ISO-8859-1" />
68

  
69
    <!-- Checks that a package-info.java file exists for each package.     -->
70
    <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
71
	<module name="JavadocPackage">
72
		<property name="allowLegacy" value="true" />
73
	</module>
74

  
75
    <!-- Checks whether files end with a new line.                        -->
76
    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
77
    <module name="NewlineAtEndOfFile"/>
78

  
79
    <!-- Checks that property files contain the same keys.         -->
80
    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
81
    <module name="Translation"/>
82
    
83
    <!-- Checks for Size Violations.                    -->
84
    <!-- See http://checkstyle.sf.net/config_sizes.html -->
85
    <module name="FileLength"/>
86
    
87
    <!-- Checks for whitespace                               -->
88
    <!-- See http://checkstyle.sf.net/config_whitespace.html -->
89
    <module name="FileTabCharacter"/>
90

  
91

  
92
    <module name="TreeWalker">
93

  
94
	    <!-- Miscellaneous other checks.                   -->
95
	    <!-- See http://checkstyle.sf.net/config_misc.html -->
96
	    <!-- gvSIG: apply only to java files -->
97
	    <module name="RegexpSinglelineJava">
98
	       <property name="format" value="\s+$"/>
99
	       <property name="minimum" value="0"/>
100
	       <property name="maximum" value="0"/>
101
	       <property name="message" value="Line has trailing spaces."/>
102
	       <property name="ignoreComments" value="true"/>
103
	    </module>
104
	    
105
        <!-- Checks for Javadoc comments.                     -->
106
        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
107
		<!--
108
			gvSIG rule 3: All protected or public classes must have a Javadoc comments,
109
			except getters and setters
110
		-->
111
		<module name="JavadocMethod">
112
			<property name="scope" value="protected" />
113
			<property name="allowMissingPropertyJavadoc" value="true" />
114
		</module>
115
		<!--
116
			gvSIG rule 9: All classes must have a Javadoc comment
117
			with the "@author tag" and the "@version $Id$" tag included 
118
		-->
119
		<module name="JavadocType">
120
			<property name="scope" value="private" />
121
			<property name="authorFormat" value="\S" />
122
			<property name="versionFormat" value="\$Id.*\$"/>
123
		</module>
124
        <module name="JavadocVariable">
125
			<property name="scope" value="protected" />
126
		</module>
127
		<!-- gvSIG rule 3: Check correctly formatted Javadoc -->
128
		<module name="JavadocStyle">
129
			<property name="scope" value="protected" />
130
		</module>
131

  
132

  
133
        <!-- Checks for Naming Conventions.                  -->
134
        <!-- See http://checkstyle.sf.net/config_naming.html -->
135
        <module name="ConstantName"/>
136
        <module name="LocalFinalVariableName"/>
137
        <module name="LocalVariableName"/>
138
        <module name="MemberName"/>
139
        <module name="MethodName"/>
140
		<!-- gvSIG rule 15: All packages must begin with org.gvsig.  -->
141
		<module name="PackageName">
142
			<property name="format" value="^org\.gvsig(\.[a-z][a-z0-9]*)+$" />
143
		</module>
144
		<!-- gvSIG advised rule 1: Abstract class names must begin with Abstract. -->
145
		<!-- module name="AbstractClassName" /-->
146
        <module name="ParameterName"/>
147
        <module name="StaticVariableName"/>
148
        <module name="TypeName"/>
149

  
150
        <!-- Checks for imports                              -->
151
        <!-- See http://checkstyle.sf.net/config_import.html -->
152
        <module name="AvoidStarImport"/>
153
        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
154
        <module name="RedundantImport"/>
155
        <module name="UnusedImports"/>
156

  
157

  
158
        <!-- Checks for Size Violations.                    -->
159
        <!-- See http://checkstyle.sf.net/config_sizes.html -->
160
        <module name="LineLength"/>
161
        <module name="MethodLength"/>
162
        <module name="ParameterNumber"/>
163

  
164

  
165
        <!-- Checks for whitespace                               -->
166
        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
167
        <module name="EmptyForIteratorPad"/>
168
        <module name="GenericWhitespace"/>
169
        <module name="MethodParamPad"/>
170
        <module name="NoWhitespaceAfter"/>
171
        <module name="NoWhitespaceBefore"/>
172
        <module name="OperatorWrap"/>
173
        <module name="ParenPad"/>
174
        <module name="TypecastParenPad"/>
175
        <module name="WhitespaceAfter"/>
176
        <module name="WhitespaceAround"/>
177

  
178

  
179
        <!-- Modifier Checks                                    -->
180
        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
181
        <module name="ModifierOrder"/>
182
        <module name="RedundantModifier"/>
183

  
184

  
185
        <!-- Checks for blocks. You know, those {}'s         -->
186
        <!-- See http://checkstyle.sf.net/config_blocks.html -->
187
        <module name="AvoidNestedBlocks"/>
188
        <module name="EmptyBlock"/>
189
        <module name="LeftCurly"/>
190
        <module name="NeedBraces"/>
191
        <module name="RightCurly"/>
192

  
193

  
194
        <!-- Checks for common coding problems               -->
195
        <!-- See http://checkstyle.sf.net/config_coding.html -->
196
        <module name="AvoidInlineConditionals"/>
197
        <module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
198
        <module name="EmptyStatement"/>
199
        <module name="EqualsHashCode"/>
200
        <module name="HiddenField"/>
201
        <module name="IllegalInstantiation"/>
202
        <module name="InnerAssignment"/>
203
        <module name="MagicNumber"/>
204
        <module name="MissingSwitchDefault"/>
205
        <module name="RedundantThrows"/>
206
        <module name="SimplifyBooleanExpression"/>
207
        <module name="SimplifyBooleanReturn"/>
208

  
209
		<!-- gvSIG: Check for some common programming errors -->
210
		<module name="CovariantEquals" />
211
		<module name="StringLiteralEquality" />
212

  
213
        <!-- Checks for class design                         -->
214
        <!-- See http://checkstyle.sf.net/config_design.html -->
215
        <module name="DesignForExtension"/>
216
        <module name="FinalClass"/>
217
        <module name="HideUtilityClassConstructor"/>
218
        <module name="InterfaceIsType"/>
219
        <module name="VisibilityModifier"/>
220

  
221

  
222
        <!-- Miscellaneous other checks.                   -->
223
        <!-- See http://checkstyle.sf.net/config_misc.html -->
224
        <module name="ArrayTypeStyle"/>
225
        <!-- gvSIG: removed -->
226
        <!-- module name="FinalParameters"/-->
227
        <module name="TodoComment"/>
228
        <module name="UpperEll"/>
229
				
230
	    <!-- gvSIG rule 2: Sun style with 4 spaces -->
231
	    <module name="Indentation">
232
	    	<property name="basicOffset" value="4"/>
233
		    <property name="caseIndent" value="0"/>
234
		</module>
235
        
236
        <!-- gvSIG rule 10: Do not use System.out/err to log -->
237
		<module name="Regexp">
238
		    <!-- . matches any character, so we need to escape it and use \. 
239
		    to match dots.-->
240
		    <property name="format" value="System\.[out|err]\.println"/>
241
		    <property name="illegalPattern" value="true"/>
242
		</module>
243
		
244
		<!-- gvSIG rule 11: Try to avoid catching Throwable or 
245
		Exception and catch specific exceptions instead. -->
246
		<module name="IllegalCatch"/>
247
		
248
		<!-- gvSIG rule 13: Use interfaces in the declaration of 
249
		methods and variables.
250
        By default only avoids usage of Classes:
251
			"java.util.GregorianCalendar, java.util.Hashtable, 
252
		  	java.util.HashSet, java.util.HashMap, java.util.ArrayList, 
253
		  	java.util.LinkedList, java.util.LinkedHashMap, 
254
		  	java.util.LinkedHashSet, java.util.TreeSet, 
255
		  	java.util.TreeMap, java.util.Vector" -->
256
		<module name="IllegalType">
257
		    <property name="ignoredMethodNames" value="getInstance"/>
258
		</module>
259
		
260
    </module>
261

  
262
	<!--  gvSIG rule 1: check for the gvSIG header -->
263
    <!-- Uneeded, use the maven-license-plugin instead
264
	<module name="RegexpHeader"> -->
265
		<!-- The follow property value demonstrates the ability     -->
266
		<!-- to have access to ANT properties. In this case it uses -->
267
		<!-- the ${basedir} property to allow Checkstyle to be run  -->
268
		<!-- from any directory within a project. See property      -->
269
		<!-- expansion,                                             -->
270
		<!-- http://checkstyle.sf.net/config.html#properties        -->
271
    <!--
272
		<property name="headerFile" value="${checkstyle.header.file}" />
273
	</module>
274
    -->
275

  
276
</module>
0 277

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.buildtools/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<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/xsd/maven-4.0.0.xsd">
3
  <modelVersion>4.0.0</modelVersion>
4
  <groupId>org.gvsig</groupId>
5
  <artifactId>org.gvsig.desktop.buildtools</artifactId>
6
  <version>1.0.0</version>
7
  <packaging>jar</packaging>
8
  <name>${project.artifactId}</name>
9
  <description>Resources used for build gvsig desktop</description>
10

  
11

  
12
<!-- No puede ser hijo de org.gvsig.desktop para evitar referencas circulares -->
13
<!--
14
  <parent>
15
    <groupId>org.gvsig</groupId>
16
    <artifactId>org.gvsig.desktop</artifactId>
17
    <version>2.0.10-SNAPSHOT</version>
18
  </parent>  
19
-->
20

  
21

  
22
    <licenses>
23
        <license>
24
            <name>GPLv3</name>
25
            <url>http://www.gnu.org/licenses/gpl.html</url>
26
            <distribution>repo</distribution>
27
            <comments>
28
			"GPL" stands for "General Public License". The most widespread such
29
			license is the GNU General Public License, or GNU GPL for short.
30
			This can be further shortened to "GPL", when it is understood that
31
			the GNU GPL is the one intended.
32
	      	</comments>
33
        </license>
34
    </licenses>
35

  
36
    <organization>
37
        <name>gvSIG Association</name>
38
        <url>http://www.gvsig.com/</url>
39
    </organization>
40

  
41
    <scm>
42
        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/trunk</connection>
43
        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/trunk</developerConnection>
44
        <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/trunk</url>
45
    </scm>
46
    
47
    <repositories>
48
      <repository>
49
        <id>gvsig-public-http-repository</id>
50
        <name>gvSIG maven public HTTP repository</name>
51
        <url>http://devel.gvsig.org/m2repo/j2se</url>
52
        <releases>
53
          <enabled>true</enabled>
54
          <updatePolicy>daily</updatePolicy>
55
          <checksumPolicy>warn</checksumPolicy>
56
        </releases>
57
        <snapshots>
58
          <enabled>true</enabled>
59
          <updatePolicy>daily</updatePolicy>
60
          <checksumPolicy>warn</checksumPolicy>
61
        </snapshots>
62
      </repository>
63
    </repositories>
64

  
65
    <distributionManagement>
66
      <site>
67
        <id>gvsig-repository</id>
68
        <url>dav:https://devel.gvsig.org/sites/${project.artifactId}/${project.version}</url>
69
      </site>
70
      <repository>
71
          <id>gvsig-repository</id>
72
          <name>gvSIG maven repository</name>
73
          <url>dav:https://devel.gvsig.org/m2repo/j2se</url>
74
          <uniqueVersion>false</uniqueVersion>
75
      </repository>
76
      <snapshotRepository>
77
          <id>gvsig-repository</id>
78
          <name>gvSIG maven repository</name>
79
          <url>dav:https://devel.gvsig.org/m2repo/j2se</url>
80
          <uniqueVersion>false</uniqueVersion>
81
      </snapshotRepository>
82
    </distributionManagement>
83
    
84
    <issueManagement>
85
      <system>redmine</system>
86
      <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop</url>
87
    </issueManagement>
88

  
89
    <mailingLists>
90
      <mailingList>
91
        <name>User List</name>
92
        <subscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios</subscribe>
93
        <unsubscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios</unsubscribe>
94
        <post>gvsig_usuarios@listserv.gva.es</post>
95
        <archive>http://www.gvsig.org/web/community/mailing-lists/gvsig-nabble</archive>
96
        <otherArchives>
97
          <otherArchive>http://www.mail-archive.com/gvsig_usuarios@runas.cap.gva.es</otherArchive>
98
          <otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive>
99
        </otherArchives>
100
      </mailingList>
101
      <mailingList>
102
        <name>Developer List</name>
103
        <subscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores</subscribe>
104
        <unsubscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores</unsubscribe>
105
        <post>gvsig_desarrolladores@listserv.gva.es</post>
106
        <archive>http://www.gvsig.org/web/community/mailing-lists/gvsig-nabble</archive>
107
        <otherArchives>
108
          <otherArchive>http://www.mail-archive.com/gvsig_desarrolladores@runas.cap.gva.es</otherArchive>
109
          <otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive>
110
        </otherArchives>
111
      </mailingList>
112
      <mailingList>
113
        <name>International List</name>
114
        <subscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</subscribe>
115
        <unsubscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</unsubscribe>
116
        <post>gvsig_internacional@listserv.gva.es</post>
117
        <archive>http://www.gvsig.org/web/community/mailing-lists/gvsig-nabble</archive>
118
        <otherArchives>
119
          <otherArchive>http://www.mail-archive.com/gvsig_internacional@runas.cap.gva.es</otherArchive>
120
          <otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive>
121
        </otherArchives>
122
      </mailingList>
123
    </mailingLists>
124
    
125
    <build>
126
        <extensions>
127
            <extension>
128
                <groupId>org.apache.maven.wagon</groupId>
129
                <artifactId>wagon-webdav-jackrabbit</artifactId>
130
                <version>1.0-beta-7</version>
131
            </extension>
132
        </extensions>
133
    </build>
134

  
135
</project>
0 136

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/utils/FrameWizardListener.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.main.utils;
30

  
31
import javax.swing.JFrame;
32

  
33
import org.gvsig.installer.swing.api.wizard.InstallerWizardActionListener;
34
import org.gvsig.installer.swing.api.wizard.InstallerWizardPanel;
35

  
36
/**
37
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
38
 */
39
public class FrameWizardListener implements InstallerWizardActionListener {
40

  
41
	private JFrame frame = null;
42

  
43
	public FrameWizardListener(JFrame frame) {
44
		super();
45
		this.frame = frame;
46
	}
47

  
48
	public void cancel(InstallerWizardPanel installerWizard) {
49
		frame.setVisible(false);
50
		System.exit(0);
51

  
52
	}
53

  
54
	public void finish(InstallerWizardPanel installerWizard) {
55
		frame.setVisible(false);
56
		System.exit(0);
57
	}
58

  
59
}
0 60

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/utils/CreateBoundleFrame.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.main.utils;
30

  
31
import java.awt.HeadlessException;
32
import java.awt.event.ActionEvent;
33
import java.awt.event.ActionListener;
34
import java.awt.event.WindowEvent;
35
import java.awt.event.WindowListener;
36
import java.io.File;
37
import java.io.FileOutputStream;
38
import java.util.ArrayList;
39
import java.util.List;
40

  
41
import javax.swing.JFrame;
42
import javax.swing.JOptionPane;
43

  
44
import org.gvsig.gui.beans.openfile.FileTextField;
45
import org.gvsig.installer.lib.impl.utils.Compress;
46

  
47
/**
48
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
49
 */
50
public class CreateBoundleFrame extends JFrame implements WindowListener,
51
		ActionListener {
52

  
53
	/**
54
     * 
55
     */
56
	private static final long serialVersionUID = -2128261599641241144L;
57
	private javax.swing.JButton executeButton;
58
	private javax.swing.JLabel inputLabel;
59
	private FileTextField inputText;
60
	private javax.swing.JLabel jLabel2;
61
	private FileTextField outputText;
62

  
63
	public CreateBoundleFrame() throws HeadlessException {
64
		super();
65
		initializeComponents();
66
		this.addWindowListener(this);
67
		executeButton.addActionListener(this);
68
	}
69

  
70
	private void initializeComponents() {
71
		java.awt.GridBagConstraints gridBagConstraints;
72

  
73
		inputLabel = new javax.swing.JLabel();
74
		executeButton = new javax.swing.JButton();
75
		inputText = new FileTextField();
76
		outputText = new FileTextField();
77
		jLabel2 = new javax.swing.JLabel();
78

  
79
		setLayout(new java.awt.GridBagLayout());
80

  
81
		inputLabel.setText("Input directory");
82
		gridBagConstraints = new java.awt.GridBagConstraints();
83
		gridBagConstraints.gridx = 0;
84
		gridBagConstraints.gridy = 0;
85
		gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
86
		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
87
		add(inputLabel, gridBagConstraints);
88

  
89
		executeButton.setText("Execute");
90
		gridBagConstraints = new java.awt.GridBagConstraints();
91
		gridBagConstraints.gridx = 1;
92
		gridBagConstraints.gridy = 2;
93
		gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
94
		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
95
		add(executeButton, gridBagConstraints);
96

  
97
		gridBagConstraints = new java.awt.GridBagConstraints();
98
		gridBagConstraints.gridx = 1;
99
		gridBagConstraints.gridy = 0;
100
		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
101
		gridBagConstraints.ipadx = 67;
102
		gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
103
		gridBagConstraints.weightx = 1.0;
104
		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
105
		add(inputText, gridBagConstraints);
106

  
107
		gridBagConstraints = new java.awt.GridBagConstraints();
108
		gridBagConstraints.gridx = 1;
109
		gridBagConstraints.gridy = 1;
110
		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
111
		gridBagConstraints.ipadx = 67;
112
		gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
113
		gridBagConstraints.weightx = 1.0;
114
		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
115
		add(outputText, gridBagConstraints);
116

  
117
		jLabel2.setText("Output");
118
		gridBagConstraints = new java.awt.GridBagConstraints();
119
		gridBagConstraints.gridx = 0;
120
		gridBagConstraints.gridy = 1;
121
		gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
122
		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
123
		add(jLabel2, gridBagConstraints);
124

  
125
	}
126

  
127
	public void windowActivated(WindowEvent arg0) {
128
		// TODO Auto-generated method stub
129

  
130
	}
131

  
132
	public void windowClosed(WindowEvent arg0) {
133
		System.exit(0);
134

  
135
	}
136

  
137
	public void windowClosing(WindowEvent arg0) {
138
		// TODO Auto-generated method stub
139

  
140
	}
141

  
142
	public void windowDeactivated(WindowEvent arg0) {
143
		// TODO Auto-generated method stub
144

  
145
	}
146

  
147
	public void windowDeiconified(WindowEvent arg0) {
148
		// TODO Auto-generated method stub
149

  
150
	}
151

  
152
	public void windowIconified(WindowEvent arg0) {
153
		// TODO Auto-generated method stub
154

  
155
	}
156

  
157
	public void windowOpened(WindowEvent arg0) {
158
		// TODO Auto-generated method stub
159

  
160
	}
161

  
162
	public void actionPerformed(ActionEvent arg0) {
163
		File inputDirectory = inputText.getSelectedFile();
164
		File outputFile = outputText.getSelectedFile();
165

  
166
		if (!inputDirectory.exists()) {
167
			JOptionPane
168
					.showMessageDialog(this, "Input directory doesn't exist");
169
			return;
170
		}
171

  
172
		if (outputFile.exists()) {
173
			outputFile.delete();
174
		}
175

  
176
		Compress compress = new Compress();
177
		try {
178
			File[] files = inputDirectory.listFiles();
179
			List<File> filesArray = new ArrayList<File>();
180
			List<String> fileNamesArray = new ArrayList<String>();
181
			for (int i = 0; i < files.length; i++) {
182
				if (!files[i].getName().toUpperCase().equals(".SVN")) {
183
					filesArray.add(files[i]);
184
					fileNamesArray.add(files[i].getName());
185
				}
186
			}
187
			compress.compressPluginsAsPackageSet(filesArray, fileNamesArray,
188
					new FileOutputStream(outputFile));
189
		} catch (Exception e) {
190
			JOptionPane.showMessageDialog(this, e.toString());
191
		}
192
	}
193
}
0 194

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/utils/CreateBundleLauncher.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.main.utils;
30

  
31
/**
32
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
33
 */
34
public class CreateBundleLauncher {
35

  
36
	public static void main(String[] args) {
37
		new CreateBundleLauncher();
38
	}
39

  
40
	public CreateBundleLauncher() {
41
		super();
42
		CreateBoundleFrame createBoundleFrame = new CreateBoundleFrame();
43
		createBoundleFrame.setBounds(0, 0, 500, 150);
44
		createBoundleFrame.setVisible(true);
45
	}
46

  
47
}
0 48

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageServiceFrame.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.main.execution;
30

  
31
import java.io.File;
32

  
33
import javax.swing.JFrame;
34

  
35
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
36
import org.gvsig.installer.main.utils.FrameWizardListener;
37
import org.gvsig.installer.swing.api.SwingInstallerLocator;
38
import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
39
import org.gvsig.installer.swing.api.execution.InstallPackageWizardException;
40
import org.gvsig.tools.locator.LocatorException;
41

  
42
/**
43
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
44
 */
45
public class InstallPackageServiceFrame extends JFrame {
46

  
47
	private static final long serialVersionUID = -5107758157530922356L;
48
	private AbstractInstallPackageWizard installerExecutionWizard;
49

  
50
	public InstallPackageServiceFrame(File applicationFolder, File installFolder)
51
			throws LocatorException, InstallPackageWizardException {
52
		super();
53
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
54
		installerExecutionWizard = SwingInstallerLocator
55
				.getSwingInstallerManager().createInstallPackageWizard(
56
						applicationFolder, installFolder);
57
		installerExecutionWizard
58
				.setWizardActionListener(new FrameWizardListener(this));
59
		this.add(installerExecutionWizard);
60
		pack();
61
	}
62

  
63
	public void installFromDefaultDirectory()
64
			throws InstallPackageServiceException {
65
		installerExecutionWizard.installFromDefaultDirectory();
66
	}
67

  
68
}
0 69

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageWizardFromDefaultDirectoryLauncher.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.main.execution;
30

  
31
import java.io.IOException;
32

  
33
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
34
import org.gvsig.installer.main.DefaultLauncher;
35
import org.gvsig.installer.swing.api.execution.InstallPackageWizardException;
36
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
37
import org.gvsig.tools.locator.LocatorException;
38

  
39
/**
40
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
41
 */
42
public class InstallPackageWizardFromDefaultDirectoryLauncher extends
43
		DefaultLauncher {
44

  
45
	public static void main(String[] args) throws LocatorException,
46
			InstallPackageServiceException, InstallPackageWizardException,
47
			IOException {
48
		new DefaultLibrariesInitializer().fullInitialize();
49
		new InstallPackageWizardFromDefaultDirectoryLauncher();
50
	}
51

  
52
	public InstallPackageWizardFromDefaultDirectoryLauncher()
53
			throws LocatorException, InstallPackageWizardException,
54
			InstallPackageServiceException, IOException {
55

  
56
		InstallPackageServiceFrame frame = new InstallPackageServiceFrame(
57
				getApplicationFolder(), getInstallFolder());
58
		frame.installFromDefaultDirectory();
59
		frame.setVisible(true);
60
	}
61
}
0 62

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageWizardLauncher.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.main.execution;
30

  
31
import java.io.IOException;
32

  
33
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
34
import org.gvsig.installer.main.DefaultLauncher;
35
import org.gvsig.installer.swing.api.execution.InstallPackageWizardException;
36
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
37
import org.gvsig.tools.locator.LocatorException;
38

  
39
/**
40
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
41
 */
42
public class InstallPackageWizardLauncher extends DefaultLauncher {
43

  
44
	public static void main(String[] args) throws LocatorException,
45
			InstallPackageServiceException, InstallPackageWizardException,
46
			IOException {
47
		new DefaultLibrariesInitializer().fullInitialize();
48
		new InstallPackageWizardLauncher();
49
	}
50

  
51
	public InstallPackageWizardLauncher() throws LocatorException,
52
			InstallPackageWizardException, InstallPackageServiceException,
53
			IOException {
54

  
55
		InstallPackageServiceFrame frame = new InstallPackageServiceFrame(
56
				getApplicationFolder(), getInstallFolder());
57
		frame.setVisible(true);
58
	}
59
}
0 60

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/creation/MakePluginPackageFrame.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.main.creation;
30

  
31
import java.io.File;
32

  
33
import javax.swing.JFrame;
34

  
35
import org.gvsig.installer.main.utils.FrameWizardListener;
36
import org.gvsig.installer.swing.api.SwingInstallerLocator;
37
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard;
38
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException;
39
import org.gvsig.tools.locator.LocatorException;
40

  
41
/**
42
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
43
 */
44
public class MakePluginPackageFrame extends JFrame {
45

  
46
	private static final long serialVersionUID = 4144834319158286247L;
47
	private MakePluginPackageWizard installerCreationWizard;
48

  
49
	public MakePluginPackageFrame(File applicationFolder, File installFolder)
50
			throws LocatorException, MakePluginPackageWizardException {
51
		super();
52
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
53
		installerCreationWizard = SwingInstallerLocator
54
				.getSwingInstallerManager().createMakePluginPackageWizard(
55
						applicationFolder, installFolder);
56
		installerCreationWizard
57
				.setWizardActionListener(new FrameWizardListener(this));
58
		this.add(installerCreationWizard);
59
		pack();
60
	}
61

  
62
}
0 63

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/creation/MakePluginPackageWizardLauncher.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.main.creation;
30

  
31
import java.io.IOException;
32

  
33
import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException;
34
import org.gvsig.installer.main.DefaultLauncher;
35
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException;
36
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
37
import org.gvsig.tools.locator.LocatorException;
38

  
39
/**
40
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
41
 */
42
public class MakePluginPackageWizardLauncher extends DefaultLauncher {
43

  
44
	public static void main(String[] args) throws LocatorException,
45
			MakePluginPackageWizardException, IOException,
46
			MakePluginPackageServiceException {
47
		new DefaultLibrariesInitializer().fullInitialize();
48
		new MakePluginPackageWizardLauncher();
49
	}
50

  
51
	public MakePluginPackageWizardLauncher() throws LocatorException,
52
			MakePluginPackageWizardException, IOException,
53
			MakePluginPackageServiceException {
54

  
55
		MakePluginPackageFrame frame = new MakePluginPackageFrame(
56
				getApplicationFolder(), getInstallFolder());
57
		frame.setVisible(true);
58
	}
59

  
60
}
0 61

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/DefaultLauncher.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.main;
30

  
31
import java.io.File;
32
import java.io.FileInputStream;
33
import java.io.FileOutputStream;
34
import java.io.IOException;
35
import java.io.InputStream;
36
import java.io.OutputStream;
37

  
38
/**
39
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
40
 */
41
public class DefaultLauncher {
42

  
43
	private File appFolder;
44

  
45
	public File getApplicationFolder() throws IOException {
46
		if (appFolder == null) {
47
			File templateFile = new File(getClass().getClassLoader()
48
					.getResource("application").getFile());
49
			appFolder = new File(System.getProperty("java.io.tmpdir")
50
					+ File.separator + "tmp_gvsig_installer");
51

  
52
			copy(templateFile, appFolder);
53
		}
54

  
55
		return appFolder;
56
	}
57

  
58
	public File getPluginsFolder() throws IOException {
59
		return new File(appFolder, "plugins");
60
	}
61

  
62
	public File getInstallFolder() throws IOException {
63
		return new File(appFolder, "install");
64
	}
65

  
66
	public void copy(File sourceLocation, File targetLocation)
67
			throws IOException {
68
		if (sourceLocation.isDirectory()) {
69
			if (!targetLocation.exists()) {
70
				targetLocation.mkdir();
71
			}
72

  
73
			String[] children = sourceLocation.list();
74
			for (int i = 0; i < children.length; i++) {
75
				copy(new File(sourceLocation, children[i]), new File(
76
						targetLocation, children[i]));
77
			}
78
		} else {
79
			targetLocation.getParentFile().mkdirs();
80

  
81
			InputStream in = new FileInputStream(sourceLocation);
82
			OutputStream out = new FileOutputStream(targetLocation);
83

  
84
			// Copy the bits from instream to outstream
85
			byte[] buf = new byte[1024];
86
			int len;
87
			while ((len = in.read(buf)) > 0) {
88
				out.write(buf, 0, len);
89
			}
90
			in.close();
91
			out.close();
92
		}
93
	}
94
}
0 95

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/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.main</artifactId>
4
  <packaging>jar</packaging>
5
  <name>org.gvsig.installer.main</name>
6
  <parent>
7
    <groupId>org.gvsig</groupId>
8
    <artifactId>org.gvsig.installer</artifactId>
9
    <version>2.0.93</version>
10
  </parent>
11
  <dependencies>
12
    <dependency>
13
      <groupId>org.gvsig</groupId>
14
      <artifactId>org.gvsig.installer.lib.api</artifactId>
15
      <scope>compile</scope>
16
    </dependency>
17
    <dependency>
18
      <groupId>org.gvsig</groupId>
19
      <artifactId>org.gvsig.installer.lib.spi</artifactId>
20
      <scope>compile</scope>
21
    </dependency>
22
    <dependency>
23
      <groupId>org.gvsig</groupId>
24
      <artifactId>org.gvsig.installer.lib.impl</artifactId>
25
    </dependency>
26
    <dependency>
27
      <groupId>org.gvsig</groupId>
28
      <artifactId>org.gvsig.installer.prov.plugin</artifactId>
29
    </dependency>
30
    <dependency>
31
      <groupId>org.gvsig</groupId>
32
      <artifactId>org.gvsig.installer.swing.api</artifactId>
33
      <scope>compile</scope>
34
    </dependency>
35
    <dependency>
36
        <groupId>org.gvsig</groupId>
37
        <artifactId>org.gvsig.installer.swing.impl</artifactId>
38
    </dependency>
39
    <dependency>
40
        <groupId>org.gvsig</groupId>
41
        <artifactId>org.gvsig.tools.lib</artifactId>
42
        <scope>compile</scope>
43
    </dependency>
44
    <dependency>
45
      <groupId>org.gvsig</groupId>
46
      <artifactId>org.gvsig.ui</artifactId>
47
      <scope>compile</scope>
48
    </dependency>
49
  </dependencies>
50
</project>
0 51

  
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.installer.lib.api.InstallerLibrary
tags/org.gvsig.desktop-2.0.93/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/InstallerManager.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.lib.api;
30

  
31
import java.io.File;
32
import java.io.IOException;
33
import java.io.InputStream;
34
import java.net.URL;
35
import java.text.MessageFormat;
36
import java.util.List;
37

  
38
import org.gvsig.installer.lib.api.creation.MakePackageService;
39
import org.gvsig.installer.lib.api.creation.MakePluginPackageService;
40
import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException;
41
import org.gvsig.installer.lib.api.execution.InstallPackageService;
42
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
43
import org.gvsig.tools.exception.BaseException;
44
import org.gvsig.tools.service.Manager;
45

  
46
/**
47
 * <p>
48
 * This manager is used to register and create the services that are used to
49
 * manage the creation and the execution of installers. An installer is a file
50
 * called <b>bundle</b> that is composed of a set <b>packages</b>.
51
 * </p>
52
 * <p>
53
 * A package has some information that is defined by the {@link PackageInfo}
54
 * class and is composed of a set of attributes. One of these attributes, the
55
 * type, denotes if the package is a plugin, theme, translation, etc.
56
 * </p>
57
 * <p>
58
 * In practice a bundle is just a compressed zip file that has a compressed zip
59
 * file for every package to install. The structure of a bundle file with two
60
 * packages of type plugin could be:
61
 * </p>
62
 * 
63
 * <pre>
64
 * - bundle (compressed file)
65
 * 		- org.gvsig.plugin1-1_0_0-23 (compressed file)
66
 * 			- org.gvsig.plugin1
67
 * 			  	- package.info   			
68
 *  	- org.gvsig.plugin2-2_0_1-35 (compressed file)
69
 *  		- org.gvsig.plugin1
70
 *  			- package.info
71
 * </pre>
72
 * <p>
73
 * <b>bundle</b> is the compressed file that contains a zip entry for every
74
 * package to install. The name of the zip entry follows next pattern:
75
 * </p>
76
 * 
77
 * <pre>
78
 * 		[package code]-[version]-[build]
79
 * </pre>
80
 * <p>
81
 * Every zip entry contains a main folder inside that contains all the package
82
 * files that are used in the installation process. Depending of the type of
83
 * packages, the information inside this folder can be different, but all the
84
 * types of packages have to have the <b>package.info</b>file that has all the
85
 * package information. To see the <b>package.info</b> description see
86
 * {@link PackageInfo}.
87
 * <p>
88
 * </p>
89
 * The services that offers this managers are basically two: the creation of
90
 * bundles for just one package of plugin type and a service for the
91
 * installation of packages from a bundle. </p>
92
 * 
93
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
94
 */
95
public interface InstallerManager extends Manager {
96

  
97
	public static final String PACKAGE_INDEX_EXTENSION = ".gvspki";
98
	public static final String PACKAGE_SET_EXTENSION = ".gvspks";
99
	public static final String PACKAGE_EXTENSION = ".gvspkg";
100
	
101
        public static final String PACKAGE_INFO_FILE_NAME = "package.info";
102
	/**
103
	 * Package state default values.
104
	 */
105
	public static interface STATE {
106

  
107
		static final String DEVEL = "devel";
108
		static final String TESTING = "testing";
109
		static final String PILOT = "pilot";
110
		static final String PROTOTYPE = "prototype";
111
		static final String ALPHA = "alpha";
112
		static final String BETA = "beta";
113
		static final String RC = "RC";
114
		static final String FINAL = "final";
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff