Ejemplo n.º 1
0
  @Override
  public void performEdit(ContentContext ctx) throws Exception {
    RequestService requestService = RequestService.getInstance(ctx.getRequest());

    GlobalContext globalContext = GlobalContext.getInstance(ctx.getRequest());

    IUserFactory userFact =
        AdminUserFactory.createUserFactory(globalContext, ctx.getRequest().getSession());
    List<IUserInfo> users = userFact.getUserInfoList();
    List<String> selectedUserName = new LinkedList<String>();
    for (IUserInfo userInfo : users) {
      String userParamName = getId(userInfo.getLogin());
      if (requestService.getParameter(userParamName, null) != null) {
        selectedUserName.add(userInfo.getLogin());
      }
    }

    String value = StringHelper.collectionToString(selectedUserName);
    if (!value.equals(getValue())) {
      setValue(value);
      setModify();
    }
  }
Ejemplo n.º 2
0
 private void writeInfo(PrintStream out) {
   StaticConfig staticConfig = StaticConfig.getInstance(getServletContext());
   Runtime runtime = Runtime.getRuntime();
   ThreadMXBean threads = ManagementFactory.getThreadMXBean();
   out.println("****************************************************************");
   out.println("****************************************************************");
   out.println("****");
   out.println("**** Current Time      :  " + StringHelper.renderTime(new Date()));
   out.println("**** Server info       :  " + getServletContext().getServerInfo());
   out.println("**** JAVA_HOME         :  " + System.getenv("JAVA_HOME"));
   out.println("**** System encoding   :  " + System.getProperty("file.encoding"));
   out.println("**** CMS encoding      :  " + ContentContext.CHARACTER_ENCODING);
   out.println("**** VERSION           :  " + VERSION);
   out.println("**** Platform type     :  " + staticConfig.getPlatformType());
   out.println("**** ENV               :  " + staticConfig.getEnv());
   out.println("**** STATIC CONFIG DIR :  " + staticConfig.getStaticConfigLocalisation());
   out.println("**** PROXY HOST        :  " + staticConfig.getProxyHost());
   out.println("**** PROXY PORT        :  " + staticConfig.getProxyPort());
   out.println("**** DIR RELATIVE      :  " + staticConfig.isDataFolderRelative());
   out.println("**** AUTO CREATION     :  " + staticConfig.isAutoCreation());
   out.println("**** CONTEXT DIR       :  " + staticConfig.getContextFolder());
   out.println("**** DATA DIR          :  " + staticConfig.getAllDataFolder());
   out.println("**** MAILING DIR       :  " + staticConfig.getMailingFolder());
   out.println("**** MAIL HI DIR       :  " + staticConfig.getMailingHistoryFolder());
   out.println("**** TPLT DIR          :  " + staticConfig.getTemplateFolder());
   out.println("**** MAIL TPLT DIR     :  " + staticConfig.getMailingTemplateFolder());
   out.println("**** THREAD DIR        :  " + staticConfig.getThreadFolder());
   out.println("**** EHCACHE FILE      :  " + staticConfig.getEHCacheConfigFile());
   out.println("**** MAIL THREAD       :  " + staticConfig.isMailingThread());
   out.println("**** ALL LOG LVL       :  " + staticConfig.getAllLogLevel());
   out.println("**** ACCESS LOG LVL    :  " + staticConfig.getAccessLogLevel());
   out.println("**** NAV LOG LVL       :  " + staticConfig.getNavigationLogLevel());
   out.println("**** SYNCHRO LOG LVL   :  " + staticConfig.getSynchroLogLevel());
   out.println("**** ALL COMP LOG LVL  :  " + staticConfig.getAllComponentLogLevel());
   out.println("**** ABST COMP LOG LVL :  " + staticConfig.getAbstractComponentLogLevel());
   out.println("**** BACKUP EXCL. PAT. :  " + staticConfig.getBackupExcludePatterns());
   out.println("**** BACKUP INCL. PAT. :  " + staticConfig.getBackupIncludePatterns());
   out.println(
       "**** HARD USERS        :  "
           + StringHelper.collectionToString(staticConfig.getEditUsers().keySet(), ","));
   out.println("**** USE EHCACHE       :  " + staticConfig.useEhCache());
   out.println(
       "**** TOTAL MEMORY      :  "
           + runtime.totalMemory()
           + " ("
           + runtime.totalMemory() / 1024
           + " KB)"
           + " ("
           + runtime.totalMemory() / 1024 / 1024
           + " MB)");
   out.println(
       "**** FREE MEMORY       :  "
           + runtime.freeMemory()
           + " ("
           + runtime.freeMemory() / 1024
           + " KB)"
           + " ("
           + runtime.freeMemory() / 1024 / 1024
           + " MB)");
   out.println("**** THREAD ****");
   out.println("**** MODIF. THREAD     :  " + staticConfig.isNotificationThread());
   out.println("**** MAILING THREAD    :  " + staticConfig.isMailingThread());
   out.println("**** THREAD COUNT      :  " + threads.getThreadCount());
   out.println("**** THREAD STR COUNT  :  " + threads.getTotalStartedThreadCount());
   out.println("**** THREAD DMN COUNT  :  " + threads.getDaemonThreadCount());
   out.println("****");
   out.println("****************************************************************");
   out.println("****************************************************************");
 }