* @see com.adito.wizard.forms.AbstractWizardForm#init(com.adito.wizard.AbstractWizardSequence)
*/
public void init(AbstractWizardSequence sequence, HttpServletRequest request) throws Exception {
try {
if(sequence.getAttribute(ATTR_SOCKS_PROXY_HOSTNAME, null) == null) {
socksProxyHostname = Property.getProperty(new ContextKey("proxies.socksProxyHost"));
if(socksProxyHostname.equals("")) {
socksProxyUsername = "";
socksProxyPort = "";
socksProxyPassword = "";
}
else {
useSOCKSProxy = true;
socksProxyUsername = Property.getProperty(new ContextKey("proxies.socksProxyUser"));
socksProxyPassword = Property.getProperty(new ContextKey("proxies.socksProxyPassword"));
socksProxyPort = Property.getProperty(new ContextKey("proxies.socksProxyPort"));
}
}
else {
useSOCKSProxy = ((String)sequence.getAttribute(ATTR_USE_SOCKS_PROXY,
String.valueOf(Property.getProperty(new ContextKey("webServer.port"))))).equals("true");
socksProxyHostname = (String)sequence.getAttribute(ATTR_SOCKS_PROXY_HOSTNAME, "");
socksProxyPort = (String)sequence.getAttribute(ATTR_SOCKS_PROXY_PORT, "");
socksProxyUsername = (String)sequence.getAttribute(ATTR_SOCKS_PROXY_USERNAME, "");
socksProxyPassword = (String)sequence.getAttribute(ATTR_SOCKS_PROXY_PASSWORD, "");
}
if(sequence.getAttribute(ATTR_HTTP_PROXY_HOSTNAME, null) == null) {
httpProxyHostname = Property.getProperty(new ContextKey("proxies.http.proxyHost"));
httpNonProxyHosts = Property.getPropertyList(new ContextKey("proxies.http.nonProxyHosts"));
if(httpProxyHostname.equals("")) {
httpProxyUsername = "";
httpProxyPort = "";
httpProxyPassword = "";
httpNonProxyHosts.clear();
}
else {
useHTTPProxy = true;
httpProxyUsername = Property.getProperty(new ContextKey("proxies.http.proxyUser"));
httpProxyPassword = Property.getProperty(new ContextKey("proxies.http.proxyPassword"));
httpProxyPort = Property.getProperty(new ContextKey("proxies.http.proxyPort"));
}
}
else {
useHTTPProxy = ((String)sequence.getAttribute(ATTR_USE_HTTP_PROXY,
String.valueOf(Property.getPropertyBoolean(new ContextKey("webServer.port"))))).equals("true");
httpProxyHostname = (String)sequence.getAttribute(ATTR_HTTP_PROXY_HOSTNAME, "");
httpProxyPort = (String)sequence.getAttribute(ATTR_HTTP_PROXY_PORT, "");
httpProxyUsername = (String)sequence.getAttribute(ATTR_HTTP_PROXY_USERNAME, "");
httpProxyPassword = (String)sequence.getAttribute(ATTR_HTTP_PROXY_PASSWORD, "");
httpNonProxyHosts = (PropertyList)sequence.getAttribute(ATTR_HTTP_NON_PROXY_HOSTS, null);