Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.lib / org.gvsig.installer.lib.impl / src / main / java / org / gvsig / installer / lib / impl / DefaultInstallerInfo.java @ 32333

History | View | Annotate | Download (3.02 KB)

1 32269 jpiera
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
* MA  02110-1301, USA.
20
*
21
*/
22
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2010 {Prodevelop}   {Task}
26
*/
27
28
package org.gvsig.installer.lib.impl;
29
30
import java.io.File;
31 32290 jpiera
import java.util.ArrayList;
32
import java.util.List;
33 32269 jpiera
34
import org.gvsig.installer.lib.api.InstallerInfo;
35
36
/**
37
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
38
 */
39
public class DefaultInstallerInfo implements InstallerInfo{
40
        protected String code = null;
41
        protected String name = null;
42
        protected String description = null;
43
        protected String version = "0.0.1";
44
        protected int build = 0;
45
        protected String state = "Testing";
46
        protected boolean official;
47 32290 jpiera
        protected List<File> selectedFiles = null;
48 32296 jpiera
        protected String antScript = null;
49 32333 jpiera
        protected String type = null;
50
51 32290 jpiera
        public DefaultInstallerInfo() {
52
                super();
53
                selectedFiles = new ArrayList<File>();
54
        }
55 32269 jpiera
56
        public String getCode() {
57
                return code;
58
        }
59
60
        public String getName() {
61
                return name;
62
        }
63
64
        public String getDescription() {
65
                return description;
66
        }
67
68
        public String getVersion() {
69
                return version;
70
        }
71
72
        public int getBuild() {
73
                return build;
74
        }
75
76
        public String getState() {
77
                return state;
78
        }
79
80
        public boolean isOfficial() {
81
                return official;
82
        }
83
84
        public void setCode(String code) {
85
                this.code = code;
86
        }
87
88
        public void setName(String name) {
89
                this.name = name;
90
        }
91
92
        public void setDescription(String description) {
93
                this.description = description;
94
        }
95
96
        public void setVersion(String version) {
97
                this.version = version;
98
        }
99
100
        public void setBuild(int build) {
101
                this.build = build;
102
        }
103
104
        public void setState(String state) {
105
                this.state = state;
106
        }
107
108
        public void setOfficial(boolean official) {
109
                this.official = official;
110
        }
111
112
        public void addFileToCopy(File file) {
113 32290 jpiera
                selectedFiles.add(file);
114 32269 jpiera
        }
115
116
        public File getFileToCopyAt(int index) {
117 32290 jpiera
                return selectedFiles.get(index);
118 32269 jpiera
        }
119
120
        public int getFileToCopySize() {
121 32290 jpiera
                return selectedFiles.size();
122 32269 jpiera
        }
123
124
        public void removeFileToCopy(int index) {
125 32290 jpiera
                selectedFiles.remove(index);
126 32269 jpiera
        }
127 32285 jpiera
128 32296 jpiera
        public String getAntScript() {
129
                return antScript;
130
        }
131
132
        public void setAnScript(String antScript) {
133
                this.antScript = antScript;
134
        }
135
136 32333 jpiera
        public String getType() {
137
                return type;
138 32296 jpiera
        }
139
140 32333 jpiera
        public void setType(String type) {
141
                this.type = type;
142 32296 jpiera
        }
143 32269 jpiera
}