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

History | View | Annotate | Download (3.04 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
import org.gvsig.tools.service.Service;
36

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