1 19 20 package com.sslexplorer.install.forms; 21 22 import java.util.ArrayList ; 23 import java.util.List ; 24 25 import javax.servlet.http.HttpServletRequest ; 26 import javax.servlet.http.HttpSession ; 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 44 private String certificateSource; 46 private String webServerPort; 47 private String webServerProtocol; 48 private List webServerListeningInterfaces; 49 private List webServerValidExternalHostnames; 50 private boolean useSOCKSProxy; 51 private boolean useHTTPProxy; 52 private String socksProxyHostname; 53 private String socksProxyPort; 54 private boolean socksProxyAuthenticate; 55 private String httpProxyHostname; 56 private String httpProxyPort; 57 private boolean httpProxyAuthenticate; 58 private List extensionsToInstall; 59 private UserDatabaseDefinition userDatabaseDefinition; 60 private boolean configurePassword; 61 private HttpSession 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 69 public String getFinishOnClick() { 70 return TaskUtil.getTaskPath(getWizardSequence().getFinishActionForward().getPath(), "install", "install", session, 440, 150); 71 } 72 73 78 public void init(AbstractWizardSequence sequence, HttpServletRequest request) throws Exception { 79 super.init(sequence, request); 80 session = request.getSession(); 81 certificateSource = (String )sequence.getAttribute(SelectCertificateSourceForm.ATTR_CERTIFICATE_SOURCE, ""); 82 webServerPort = (String )sequence.getAttribute(WebServerForm.ATTR_WEB_SERVER_PORT, ""); 83 webServerProtocol = (String )sequence.getAttribute(WebServerForm.ATTR_WEB_SERVER_PROTOCOL, "http"); 84 webServerListeningInterfaces = PropertyList.createFromTextFieldText((String )sequence.getAttribute(WebServerForm.ATTR_LISTENING_INTERFACES, "")); 85 webServerValidExternalHostnames = PropertyList.createFromTextFieldText((String )sequence.getAttribute(WebServerForm.ATTR_VALID_EXTERNAL_HOSTS, "")); 86 useSOCKSProxy = "true".equals((String )sequence.getAttribute(ConfigureProxiesForm.ATTR_USE_SOCKS_PROXY, "")); 87 useHTTPProxy = "true".equals((String )sequence.getAttribute(ConfigureProxiesForm.ATTR_USE_HTTP_PROXY, "")); 88 socksProxyHostname = (String )sequence.getAttribute(ConfigureProxiesForm.ATTR_SOCKS_PROXY_HOSTNAME, ""); 89 socksProxyPort = (String )sequence.getAttribute(ConfigureProxiesForm.ATTR_SOCKS_PROXY_PORT, ""); 90 socksProxyAuthenticate= !("".equals((String )sequence.getAttribute(ConfigureProxiesForm.ATTR_SOCKS_PROXY_USERNAME, ""))); 91 httpProxyHostname = (String )sequence.getAttribute(ConfigureProxiesForm.ATTR_HTTP_PROXY_HOSTNAME, ""); 92 httpProxyPort = (String )sequence.getAttribute(ConfigureProxiesForm.ATTR_HTTP_PROXY_PORT, ""); 93 httpProxyAuthenticate= !("".equals((String )sequence.getAttribute(ConfigureProxiesForm.ATTR_HTTP_PROXY_USERNAME, ""))); 94 extensionsToInstall = new ArrayList (); 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 )sequence.getAttribute(SelectUserDatabaseForm.ATTR_USER_DATABASE, "")); 99 100 } 101 102 105 public String getCertificateSource() { 106 return certificateSource; 107 } 108 109 112 public String getHttpProxyHostname() { 113 return httpProxyHostname; 114 } 115 116 119 public String getHttpProxyPort() { 120 return httpProxyPort; 121 } 122 123 126 public String getSocksProxyHostname() { 127 return socksProxyHostname; 128 } 129 130 133 public String getSocksProxyPort() { 134 return socksProxyPort; 135 } 136 137 140 public boolean getUseHTTPProxy() { 141 return useHTTPProxy; 142 } 143 144 147 public boolean getUseSOCKSProxy() { 148 return useSOCKSProxy; 149 } 150 151 154 public List getWebServerListeningInterfaces() { 155 return webServerListeningInterfaces; 156 } 157 158 161 public String getWebServerPort() { 162 return webServerPort; 163 } 164 165 168 public List getWebServerValidExternalHostnames() { 169 return webServerValidExternalHostnames; 170 } 171 172 175 public boolean getHttpProxyAuthenticate() { 176 return httpProxyAuthenticate; 177 } 178 179 182 public boolean getSocksProxyAuthenticate() { 183 return socksProxyAuthenticate; 184 } 185 186 189 public List getExtensionsToInstall() { 190 return extensionsToInstall; 191 } 192 193 196 public boolean getConfigurePassword() { 197 return configurePassword; 198 } 199 200 203 public UserDatabaseDefinition getUserDatabaseDefinition() { 204 return userDatabaseDefinition; 205 } 206 207 public String getWebServerProtocol() { 208 return webServerProtocol; 209 } 210 211 public void setWebServerProtocol(String webServerProtocol) { 212 this.webServerProtocol = webServerProtocol; 213 } 214 } 215 | Popular Tags |