Examples of SystemConfigManager


Examples of de.iritgo.aktera.configuration.SystemConfigManager

          break;
      }

      persistent.update();

      SystemConfigManager systemConfigManager = (SystemConfigManager) req.getSpringBean(SystemConfigManager.ID);

      systemConfigManager.invalidate(persistent.getFieldString("category"), persistent.getFieldString("name"));
    }

    return modified;
  }
View Full Code Here

Examples of de.iritgo.aktera.configuration.SystemConfigManager

    if (! UserTools.currentUserIsInGroup(req, "root"))
    {
      return res;
    }

    SystemConfigManager systemConfigManager = (SystemConfigManager) req.getSpringBean(SystemConfigManager.ID);

    String state = systemConfigManager.getConfigState();

    if (SystemConfigManager.CHANGE_REBOOT.equals(state))
    {
      Output out = res.createOutput("warning", "configurationWasModifiedAndNeedsRebootHint");

      out.setAttribute("bundle", "IPtellBase");
      res.add(out);
    }
    else if (systemConfigManager.isRebootFlagSet())
    {
      Output out = res.createOutput("warning", "rebootIsNeededHint");

      out.setAttribute("bundle", "IPtellBase");
      res.add(out);
    }
    else if (systemConfigManager.configNeedsRestart())
    {
      Output out = res.createOutput("warning", "restartIsNeededHint");

      out.setAttribute("bundle", "IPtellBase");
      res.add(out);
View Full Code Here

Examples of de.iritgo.aktera.configuration.SystemConfigManager

   * @param req The model request.
   * @throws ModelException In case of a business failure.
   */
  public ModelResponse execute(ModelRequest req) throws ModelException
  {
    SystemConfigManager systemConfigManager = (SystemConfigManager) req.getSpringBean(SystemConfigManager.ID);

    String menu = (String) UserTools.getContextObject(req, "aktera.currentMenu");

    if (menu == null && UserTools.currentUserIsInGroup(req, "admin"))
    {
      menu = (String) systemConfigManager.get("system", "startMenuAdmin");
    }

    if (menu == null && UserTools.currentUserIsInGroup(req, "manager"))
    {
      menu = (String) systemConfigManager.get("system", "startMenuManager");
    }

    if (menu == null && UserTools.getCurrentUserId(req) != null)
    {
      menu = (String) systemConfigManager.get("system", "startMenu");
    }

    if (menu != null)
    {
      return ModelTools.callModel(req, menu);
View Full Code Here

Examples of de.iritgo.aktera.configuration.SystemConfigManager

    try
    {
      request = ModelTools.createModelRequest();

      SystemConfigManager systemConfigManager = (SystemConfigManager) request
              .getSpringBean(SystemConfigManager.ID);

      if (! StringTools.isTrimEmpty(systemConfigManager.getString("tb2", "logLevel")))
      {
        KeelContainer.defaultContainer().setLogLevel(systemConfigManager.getString("tb2", "logLevel"));
      }
    }
    catch (ServiceException x)
    {
    }
View Full Code Here

Examples of de.iritgo.aktera.configuration.SystemConfigManager

   */
  public ModelResponse execute(ModelRequest req) throws ModelException
  {
    try
    {
      SystemConfigManager systemConfigManager = (SystemConfigManager) SpringTools.getBean(SystemConfigManager.ID);

      PermissionManager permissionManager = (PermissionManager) SpringTools.getBean(PermissionManager.ID);

      ModelResponse res = req.createResponse();

      boolean byGroups = NumberTools.toBool(req.getParameter("byGroups"), false);

      readConfig(req);

      int itemsPerRow = 3;

      if ("toolBar".equals(style))
      {
        itemsPerRow = 16;
      }

      String currentItem = (String) UserTools.getContextObject(req, "aktera.currentMenuItem");

      if (currentItem == null && UserTools.currentUserIsInGroup(req, "admin"))
      {
        currentItem = (String) systemConfigManager.get("system", "startMenuItemAdmin");
      }

      if (currentItem == null && UserTools.currentUserIsInGroup(req, "manager"))
      {
        currentItem = (String) systemConfigManager.get("system", "startMenuItemManager");
      }

      if (currentItem == null && UserTools.getCurrentUserId(req) != null)
      {
        currentItem = (String) systemConfigManager.get("system", "startMenuItem");
      }

      Output outFunctions = res.createOutput("functions");

      if (! byGroups)
View Full Code Here

Examples of de.iritgo.aktera.configuration.SystemConfigManager

  public ModelResponse execute(ModelRequest req) throws ModelException
  {
    PersistentFactory persistentManager = (PersistentFactory) req.getService(PersistentFactory.ROLE, req
            .getDomain());

    SystemConfigManager systemConfigManager = (SystemConfigManager) req.getSpringBean(SystemConfigManager.ID);

    ModelResponse res = req.createResponse();

    Configuration config = getConfiguration();

    String layoutName = "iritgo";

    try
    {
      layoutName = systemConfigManager.getString("gui", "layout");
    }
    catch (Exception x)
    {
    }

    String themeName = "iritgong";

    try
    {
      themeName = (String) systemConfigManager.get("gui", "defaultTheme");

      if (themeName == null && config != null)
      {
        themeName = config.getChild("theme-name").getValue("root");
      }

      if (themeName == null)
      {
        themeName = "iritgong";
      }

      if (! systemConfigManager.getBool("gui", "disableThemeChange"))
      {
        Preferences preferences = (Preferences) UserTools.getUserEnvObject(req, "sessionPreferences");

        if (preferences != null)
        {
View Full Code Here

Examples of de.iritgo.aktera.configuration.SystemConfigManager

   * @param req The model request.
   * @throws ModelException In case of a business failure.
   */
  public ModelResponse execute(ModelRequest req) throws ModelException
  {
    SystemConfigManager systemConfigManager = (SystemConfigManager) req.getSpringBean(SystemConfigManager.ID);

    ModelResponse res = req.createResponse();

    if (! UpdateHelper.databaseExists(req))
    {
      return res.createCommand("aktera.database.create-prompt").execute(req, res);
    }

    try
    {
      if (UpdateHelper.needUpdate(req))
      {
        return res.createCommand("aktera.database.update-prompt").execute(req, res);
      }
    }
    catch (ConfigurationException x)
    {
      throw new ModelException("ConfigurationException during needUpdate() check", x);
    }

    try
    {
      SystemCheckService systemCheckService = (SystemCheckService) SpringTools.getBean(SystemCheckService.ID);
      if (systemCheckService != null && ! systemCheckService.isSystemReady())
      {
        return res.createCommand(systemCheckService.getSystemCheckModel()).execute(req, res);
      }
    }
    catch (Exception ignore)
    {
      // No system check service configured.
    }

    String startModel = (String) systemConfigManager.get("system", "startModel");

    if (startModel != null && UserTools.getCurrentUserId(req) == null)
    {
      return res.createCommand("aktera.session.prompt-login").execute(req, res);
    }

    if (UserTools.currentUserIsInGroup(req, "admin"))
    {
      return res.createCommand((String) systemConfigManager.get("system", "startModelAdmin")).execute(req, res);
    }
    else if (UserTools.currentUserIsInGroup(req, "manager"))
    {
      return res.createCommand((String) systemConfigManager.get("system", "startModelManager")).execute(req, res);
    }

    return res.createCommand(startModel).execute(req, res);
  }
View Full Code Here

Examples of org.openrdf.repository.manager.config.SystemConfigManager

        SystemRepository systemRepos = new SystemRepository(systemDir);
        systemRepos.initialize();

        systemRepos.addRepositoryConnectionListener(new ConfigChangeListener());
        Repository systemRepository = systemRepos;
        setRepositoryConfigManager(new SystemConfigManager(systemRepository));

        assignSystemRepository(systemRepository);
      }
      else {
        // Sesame 3.0 directory
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.