Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.lib / org.gvsig.installer.lib.api / src / main / java / org / gvsig / installer / lib / api / execution / InstallerExecutionService.java @ 32333

History | View | Annotate | Download (2.64 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.api.execution;
29

    
30
import java.io.File;
31
import java.io.InputStream;
32

    
33
import org.gvsig.installer.lib.api.InstallerInfo;
34
import org.gvsig.installer.lib.api.creation.InstallerCreationService;
35

    
36
/**
37
 * <p>
38
 * This service is used to execute an installer file and install the
39
 * plugins contained in it. It has methods to set the installer file,
40
 * to read the plugins that can be installed, to select the plugins
41
 * to install and to install them.  
42
 * </p>
43
 * <p>
44
 * The installer stream is a normally a file that has been created using
45
 * the {@link InstallerCreationService} service. It is possible to create
46
 * an installer manually, but it has to have the structure defined by the
47
 * {@link InstallerCreationService} class.
48
 * </p>
49
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
50
 */
51
public interface InstallerExecutionService {
52
        
53
        /**
54
         * Sets the stream that contains the installer that contains the 
55
         * information to install some plugins. This stream is a zip file
56
         * that has to have the structure defined in the {@link InstallerCreationService}
57
         * documentation.         * 
58
         * @param inputStream
59
         * The stream that contains the installer information.
60
         * @throws InstallerExecutionServiceException
61
         * It is thrown if there is an exception reading the stream
62
         */
63
        public void setInstaller(InputStream inputStream) throws InstallerExecutionServiceException;
64
        
65
        /**
66
         * It 
67
         * @param outputDirectory
68
         * @throws InstallerExecutionServiceException
69
         */
70
        public void executeInstaller(File outputDirectory) throws InstallerExecutionServiceException;
71
        
72
        public void selectPluginToInstall(int index);
73
        
74
        public int getPluginsSize();
75
        
76
        public InstallerInfo getPluginInfoAt(int index);
77
}
78