String formParameters = (String) seq.getAttribute(WebForwardAuthenticationDetailsForm.ATTR_FORM_PARAMETERS, "");
String formType = (String) seq.getAttribute(WebForwardAuthenticationDetailsForm.ATTR_FORM_TYPE, "");
boolean autoStart = false; // TODO this needs to be hooked in
User user = this.getSessionInfo(request).getUser();
WebForward webForward = null;
try {
try {
Calendar now = Calendar.getInstance();
if (type == WebForward.TYPE_TUNNELED_SITE) {
com.adito.webforwards.TunneledSiteWebForward sswf = new com.adito.webforwards.TunneledSiteWebForward(user.getRealm().getRealmID(),
-1, destinationURL, name, description, category, autoStart, now, now);
webForward = WebForwardDatabaseFactory.getInstance().createWebForward(sswf);
CoreEvent evt = new ResourceChangeEvent(this, WebForwardEventConstants.CREATE_WEB_FORWARD, webForward, this
.getSessionInfo(request), CoreEvent.STATE_SUCCESSFUL).addAttribute(
WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_CATEGORY, webForward.getCategory()).addAttribute(
WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_TYPE,
((WebForwardTypeItem) WebForwardTypes.WEB_FORWARD_TYPES.get(webForward.getType())).getName()).addAttribute(
WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_URL, webForward.getDestinationURL());
CoreServlet.getServlet().fireCoreEvent(evt);
} else if (type == WebForward.TYPE_REPLACEMENT_PROXY) {
com.adito.webforwards.ReplacementProxyWebForward spwf = new com.adito.webforwards.ReplacementProxyWebForward(user.getRealm().getRealmID(),
-1, destinationURL, name, description, category, authenticationUsername,
authenticationPassword, preferredAuthenticationScheme, encodeing, restrictToHosts, formType,