}
private void doShutdown(HttpServletRequest request, ShutdownForm shutdownForm, final boolean restart) {
StoppableTimer timer = (StoppableTimer) CoreServlet.getServlet().getServletContext().getAttribute(StoppableTimer.NAME);
ShutdownTimerTask stt = new ShutdownTimerTask(restart, Integer.parseInt(shutdownForm.getShutdownDelay()));
timer.schedule(ShutdownTimerTask.NAME, stt, stt.getDelay());
GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.ALL_USERS, new BundleActionMessage("setup",
"shutdown.global.warning.message",
stt.getShutDownTimeString()), DismissType.NO_DISMISS));
request.getSession().setAttribute(Constants.RESTARTING, Boolean.valueOf(restart));
}