KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > install > forms > InstallationSummaryForm


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
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 of
9  * the License, or (at your option) any later version.
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
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.install.forms;
21
22 import java.util.ArrayList JavaDoc;
23 import java.util.List JavaDoc;
24
25 import javax.servlet.http.HttpServletRequest JavaDoc;
26 import javax.servlet.http.HttpSession JavaDoc;
27
28 import org.apache.commons.logging.Log;
29 import org.apache.commons.logging.LogFactory;
30
31 import com.sslexplorer.boot.PropertyList;
32 import com.sslexplorer.core.UserDatabaseManager;
33 import com.sslexplorer.security.UserDatabaseDefinition;
34 import com.sslexplorer.tasks.TaskUtil;
35 import com.sslexplorer.wizard.AbstractWizardSequence;
36 import com.sslexplorer.wizard.forms.DefaultWizardForm;
37
38 public class InstallationSummaryForm extends DefaultWizardForm {
39     
40     final static Log log = LogFactory.getLog(InstallationSummaryForm.class);
41
42     // Private statics for sequence attributes
43

44     // Private instance variables
45
private String JavaDoc certificateSource;
46     private String JavaDoc webServerPort;
47     private String JavaDoc webServerProtocol;
48     private List JavaDoc webServerListeningInterfaces;
49     private List JavaDoc webServerValidExternalHostnames;
50     private boolean useSOCKSProxy;
51     private boolean useHTTPProxy;
52     private String JavaDoc socksProxyHostname;
53     private String JavaDoc socksProxyPort;
54     private boolean socksProxyAuthenticate;
55     private String JavaDoc httpProxyHostname;
56     private String JavaDoc httpProxyPort;
57     private boolean httpProxyAuthenticate;
58     private List JavaDoc extensionsToInstall;
59     private UserDatabaseDefinition userDatabaseDefinition;
60     private boolean configurePassword;
61     private HttpSession JavaDoc session;
62
63     public InstallationSummaryForm() {
64         super(false, true, "/WEB-INF/jsp/content/install/installationSummary.jspf",
65             "", true, true, "installationSummary", "install", "installation.installationSummary", 7);
66     }
67
68     @Override JavaDoc
69     public String JavaDoc getFinishOnClick() {
70         return TaskUtil.getTaskPath(getWizardSequence().getFinishActionForward().getPath(), "install", "install", session, 440, 150);
71     }
72
73     /*
74      * (non-Javadoc)
75      *
76      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#init(com.sslexplorer.wizard.AbstractWizardSequence)
77      */

78     public void init(AbstractWizardSequence sequence, HttpServletRequest JavaDoc request) throws Exception JavaDoc {
79         super.init(sequence, request);
80         session = request.getSession();
81         certificateSource = (String JavaDoc)sequence.getAttribute(SelectCertificateSourceForm.ATTR_CERTIFICATE_SOURCE, "");
82         webServerPort = (String JavaDoc)sequence.getAttribute(WebServerForm.ATTR_WEB_SERVER_PORT, "");
83         webServerProtocol = (String JavaDoc)sequence.getAttribute(WebServerForm.ATTR_WEB_SERVER_PROTOCOL, "http");
84         webServerListeningInterfaces = PropertyList.createFromTextFieldText((String JavaDoc)sequence.getAttribute(WebServerForm.ATTR_LISTENING_INTERFACES, ""));
85         webServerValidExternalHostnames = PropertyList.createFromTextFieldText((String JavaDoc)sequence.getAttribute(WebServerForm.ATTR_VALID_EXTERNAL_HOSTS, ""));
86         useSOCKSProxy = "true".equals((String JavaDoc)sequence.getAttribute(ConfigureProxiesForm.ATTR_USE_SOCKS_PROXY, ""));
87         useHTTPProxy = "true".equals((String JavaDoc)sequence.getAttribute(ConfigureProxiesForm.ATTR_USE_HTTP_PROXY, ""));
88         socksProxyHostname = (String JavaDoc)sequence.getAttribute(ConfigureProxiesForm.ATTR_SOCKS_PROXY_HOSTNAME, "");
89         socksProxyPort = (String JavaDoc)sequence.getAttribute(ConfigureProxiesForm.ATTR_SOCKS_PROXY_PORT, "");
90         socksProxyAuthenticate= !("".equals((String JavaDoc)sequence.getAttribute(ConfigureProxiesForm.ATTR_SOCKS_PROXY_USERNAME, "")));
91         httpProxyHostname = (String JavaDoc)sequence.getAttribute(ConfigureProxiesForm.ATTR_HTTP_PROXY_HOSTNAME, "");
92         httpProxyPort = (String JavaDoc)sequence.getAttribute(ConfigureProxiesForm.ATTR_HTTP_PROXY_PORT, "");
93         httpProxyAuthenticate= !("".equals((String JavaDoc)sequence.getAttribute(ConfigureProxiesForm.ATTR_HTTP_PROXY_USERNAME, "")));
94         extensionsToInstall = new ArrayList JavaDoc();
95         if(sequence.getAttribute(InstallXtraForm.ATTR_INSTALL_XTRA, "false").equals("true")) {
96             extensionsToInstall.add("SSL-Explorer Enterprise Edition");
97         }
98         userDatabaseDefinition = UserDatabaseManager.getInstance().getUserDatabaseDefinition((String JavaDoc)sequence.getAttribute(SelectUserDatabaseForm.ATTR_USER_DATABASE, ""));
99         
100     }
101
102     /**
103      * @return Returns the certificateSource.
104      */

105     public String JavaDoc getCertificateSource() {
106         return certificateSource;
107     }
108
109     /**
110      * @return Returns the httpProxyHostname.
111      */

112     public String JavaDoc getHttpProxyHostname() {
113         return httpProxyHostname;
114     }
115
116     /**
117      * @return Returns the httpProxyPort.
118      */

119     public String JavaDoc getHttpProxyPort() {
120         return httpProxyPort;
121     }
122
123     /**
124      * @return Returns the socksProxyHostname.
125      */

126     public String JavaDoc getSocksProxyHostname() {
127         return socksProxyHostname;
128     }
129
130     /**
131      * @return Returns the socksProxyPort.
132      */

133     public String JavaDoc getSocksProxyPort() {
134         return socksProxyPort;
135     }
136
137     /**
138      * @return Returns the useHTTPProxy.
139      */

140     public boolean getUseHTTPProxy() {
141         return useHTTPProxy;
142     }
143
144     /**
145      * @return Returns the useSOCKSProxy.
146      */

147     public boolean getUseSOCKSProxy() {
148         return useSOCKSProxy;
149     }
150
151     /**
152      * @return Returns the webServerListeningInterfaces.
153      */

154     public List JavaDoc getWebServerListeningInterfaces() {
155         return webServerListeningInterfaces;
156     }
157
158     /**
159      * @return Returns the webServerPort.
160      */

161     public String JavaDoc getWebServerPort() {
162         return webServerPort;
163     }
164
165     /**
166      * @return Returns the webServerValidExternalHostnames.
167      */

168     public List JavaDoc getWebServerValidExternalHostnames() {
169         return webServerValidExternalHostnames;
170     }
171
172     /**
173      * @return Returns the httpProxyAuthenticate.
174      */

175     public boolean getHttpProxyAuthenticate() {
176         return httpProxyAuthenticate;
177     }
178
179     /**
180      * @return Returns the socksProxyAuthenticate.
181      */

182     public boolean getSocksProxyAuthenticate() {
183         return socksProxyAuthenticate;
184     }
185
186     /**
187      * @return Returns the extensionsToInstall.
188      */

189     public List JavaDoc getExtensionsToInstall() {
190         return extensionsToInstall;
191     }
192
193     /**
194      * @return Returns the configurePassword.
195      */

196     public boolean getConfigurePassword() {
197         return configurePassword;
198     }
199
200     /**
201      * @return Returns the userDatabase.
202      */

203     public UserDatabaseDefinition getUserDatabaseDefinition() {
204         return userDatabaseDefinition;
205     }
206
207     public String JavaDoc getWebServerProtocol() {
208         return webServerProtocol;
209     }
210
211     public void setWebServerProtocol(String JavaDoc webServerProtocol) {
212         this.webServerProtocol = webServerProtocol;
213     }
214 }
215
Popular Tags