logger.finer("Finished starting up InitJizzActivity");
}
@Override
public void saveAndGetStarted() {
ServerSettings settings = new ServerSettings();
settings.setStationName(initJizzView.getStationName());
settings.setStationLocale(initJizzView.getStationLocale());
settings.setStationUrl(initJizzView.getStationUrl());
CronDateUtil du = new CronDateUtil();
settings.setBroadcastSchedule(du.parseDate(initJizzView
.getBroadcastEnd()));
String[] smtpServerBits = initJizzView.getSmtpServer().split(":");
if (smtpServerBits.length >= 1) {
settings.setSmtpServerHost(smtpServerBits[0]);
}
if (smtpServerBits.length >= 2) {
try {
settings.setSmtpServerPort(Integer.parseInt(smtpServerBits[1]));
} catch (NumberFormatException nfEx) {
errorHandler.argh(errorMessages
.invalidSmtpServerPort(smtpServerBits[1]));
return;
}
} else {
settings.setSmtpServerPort(-1);
}
SetSettingsAction action = new SetSettingsAction();
action.setSettings(settings);