1 package org.splat.simer;
5 import org.splat.som.ApplicationRights;
6 import org.splat.wapp.Constants;
9 * Start application action. Initializes application settings.
11 public class StartAction extends Action {
15 private static final long serialVersionUID = 5875058140682652964L;
17 // ==============================================================================================================================
19 // ==============================================================================================================================
22 * Initialize application.
24 * @return SUCCESS if succeeded, ERROR - if exception is caught
26 public String doInitialize() {
27 StringBuffer wappurl = getServletRequest().getRequestURL(); // "http://{server}:{port}/{webapp}/", including the leading '/'
30 LOG.info(new StringBuffer("Initializing ").append(wappurl)
31 .append("...").toString());
33 ApplicationSettings wapp = getApplicationSettings();
34 wapp.setLocale(this.getLocale());
35 String root = ApplicationSettings.getApplicationRootPath();
36 LOG.debug("Application root: " + root);
38 // Configure menus for the current user
41 // Initialization of the user session
42 Map<String, Object> session = getSession();
44 session.put("user.rights", new ApplicationRights(null)); // No user connected yet
45 session.put("study.filter", wapp.getFilter(Constants.STUDY_MENU));
46 session.put("knowledge.filter", wapp
47 .getFilter(Constants.KNOWLEDGE_MENU));
49 initializationScreenContext(Constants.NONE);
51 } catch (Exception error) {
52 LOG.fatal("Reason:", error);
54 initializationFullScreenContext(Constants.STUDY_MENU,
55 Constants.STUDY_MENU, Constants.TRUE, Constants.NONE,
56 Constants.STUDY_MENU);