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 @ 32290

History | View | Annotate | Download (2.72 KB)

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

    
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2010 {Prodevelop}   {Task}
26
*/
27
 
28
package org.gvsig.installer.lib.impl;
29

    
30
import java.io.File;
31
import java.util.ArrayList;
32
import java.util.List;
33

    
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
        protected List<File> selectedFiles = null;
48
        
49
        public DefaultInstallerInfo() {
50
                super();
51
                selectedFiles = new ArrayList<File>();
52
        }
53

    
54
        public String getCode() {
55
                return code;
56
        }
57
        
58
        public String getName() {
59
                return name;
60
        }
61
        
62
        public String getDescription() {
63
                return description;
64
        }
65

    
66
        public String getVersion() {
67
                return version;
68
        }
69

    
70
        public int getBuild() {
71
                return build;
72
        }
73

    
74
        public String getState() {
75
                return state;
76
        }
77

    
78
        public boolean isOfficial() {
79
                return official;
80
        }
81
        
82
        public void setCode(String code) {
83
                this.code = code;
84
        }        
85
        
86
        public void setName(String name) {
87
                this.name = name;
88
        }
89
        
90
        public void setDescription(String description) {
91
                this.description = description;
92
        }
93
        
94
        public void setVersion(String version) {
95
                this.version = version;
96
        }
97
        
98
        public void setBuild(int build) {
99
                this.build = build;
100
        }
101
        
102
        public void setState(String state) {
103
                this.state = state;
104
        }
105

    
106
        public void setOfficial(boolean official) {
107
                this.official = official;
108
        }
109

    
110
        public void addFileToCopy(File file) {
111
                selectedFiles.add(file);                
112
        }
113

    
114
        public File getFileToCopyAt(int index) {
115
                return selectedFiles.get(index);
116
        }
117

    
118
        public int getFileToCopySize() {
119
                return selectedFiles.size();
120
        }
121

    
122
        public void removeFileToCopy(int index) {
123
                selectedFiles.remove(index);                
124
        }
125

    
126
}
127