Package com.centraview.administration.applicationsettings

Examples of com.centraview.administration.applicationsettings.AppSettings


    Vector vec = new Vector();

    try {
      AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject(
          "com.centraview.administration.applicationsettings.AppSettingsHome", "AppSettings");
      AppSettings appRemote = appHome.create();
      appRemote.setDataSource(this.dataSource);

      vec = appRemote.getRecordType(module);
    } catch (Exception e) {
      logger.error("[getRecordType] Exception thrown.", e);
    }
    return vec;
  }
View Full Code Here


  private final File getCustomerLogoFile(String dataSource, File fsRoot)
  {
    String customerLogoName = null;
    try {
      AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject("com.centraview.administration.applicationsettings.AppSettingsHome", "AppSettings");
      AppSettings appRemote = appHome.create();
      appRemote.setDataSource(dataSource);
      customerLogoName = appRemote.getApplicationSettings("CUSTOMERLOGO");
    } catch (Exception e) {
      logger.error("[getCustomerLogoFile] Exception thrown.", e);
    }
    File customerLogo = new File(fsRoot.getAbsolutePath() + Constants.CUSTOMERLOGO_PATH + customerLogoName);
    return customerLogo;
View Full Code Here

      mailRemote.setDataSource(dataSource);

      Vector accountList = (Vector)mailRemote.getAccountList();
     
      AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject("com.centraview.administration.applicationsettings.AppSettingsHome","AppSettings");
      AppSettings appRemote = (AppSettings)appHome.create();
      appRemote.setDataSource(dataSource);
     
      Vector supportMailIds = (Vector)appRemote.getSupportMailId();
     
      try {
        SupportHelperHome supportHome = (SupportHelperHome)CVUtility.getHomeObject("com.centraview.support.helper.SupportHelperHome", "SupportHelper");
        SupportHelper supportRemote = (SupportHelper)supportHome.create();
        supportRemote.setDataSource(dataSource);
        int supportInterval = supportRemote.getSupportEmailCheckInterval();
        dynaForm.set("emailCheckInterval", new Integer(supportInterval));
      } catch (Exception e) {
        dynaForm.set("emailCheckInterval", new Integer(0));
      }


      String ownerid = appRemote.getApplicationSettings("DEFAULTOWNER");
      if (ownerid.length() == 0 || ownerid == null) {
        ownerid = "";
      }
      String ownerName="";
      if (ownerid != null && !ownerid.equals("")) {
View Full Code Here

   
    try {
      CustomerLogoForm custform = (CustomerLogoForm)form;
     
      AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject("com.centraview.administration.applicationsettings.AppSettingsHome", "AppSettings");
      AppSettings appRemote = (AppSettings)appHome.create();
      appRemote.setDataSource(dataSource);
     
      String cust = appRemote.getApplicationSettings("CUSTOMERLOGO");
     
      custform.setCurrentfile(cust);
      request.setAttribute("Cust", cust);
      FORWARD_final = FORWARD_customerlogo;
    } catch (Exception e) {
View Full Code Here

      }

      DynaActionForm dynaform = (DynaActionForm)form;

      AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject("com.centraview.administration.applicationsettings.AppSettingsHome", "AppSettings");
      AppSettings appRemote = appHome.create();
      appRemote.setDataSource(dataSource);

      HashMap hm = (HashMap)appRemote.getCalendarSettings();

      SimpleDateFormat simpleDateFormat = new SimpleDateFormat("h:mm a");
      Time startTime = (Time)hm.get("starttime");
      Time endTime = (Time)hm.get("endtime");
     
View Full Code Here

      UserObject userObject = (UserObject) session.getAttribute("userobject");
      int IndividualId = userObject.getIndividualID();
      DynaActionForm dynaform = (DynaActionForm) form;

      AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject("com.centraview.administration.applicationsettings.AppSettingsHome", "AppSettings");
      AppSettings appRemote = appHome.create();
      appRemote.setDataSource(dataSource);
     
      SimpleDateFormat simpleDateFormat = new SimpleDateFormat("h:mm a");
      Time startTime;
      Time endTime;
      try {
        Date tempDate = simpleDateFormat.parse(dynaform.get("startTime").toString());
        startTime = new Time(tempDate.getTime());
      } catch (Exception e) {
        Date tempDate = simpleDateFormat.parse("8:00 AM");
        startTime = new Time(tempDate.getTime());
      }
     
      try {
        Date tempDate = simpleDateFormat.parse(dynaform.get("endTime").toString());
        endTime = new Time(tempDate.getTime());
      } catch (Exception e) {
        Date tempDate = simpleDateFormat.parse("5:00 PM");
        endTime = new Time(tempDate.getTime());
      }
     
      appRemote.updateCalendarSettings(startTime.toString(), endTime.toString(),  dynaform.get("workingdays").toString());

      if (button.equals("save")) {
        returnStatus = "save";
        FORWARD_final = FORWARD_save;
      } else if (button.equals("saveandclose")) {
View Full Code Here

          File logoFile = new File(fsRoot.getAbsolutePath() + Constants.CUSTOMERLOGO_PATH + fileName);
          siteInfo.setCustomerLogo(logoFile);
          siteInfo.setCustomerLogoDirty(true);
        }
        AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject("com.centraview.administration.applicationsettings.AppSettingsHome", "AppSettings");
        AppSettings appRemote = (AppSettings)appHome.create();
        appRemote.updateApplicationSettings("CUSTOMERLOGO", fileName);
      }
      FORWARD_final = FORWARD_save;
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      FORWARD_final = GLOBAL_FORWARD_failure;
View Full Code Here

      for (int i = 0; i < arrayLength; i++) {
        DDNameValue tempDDNameValue =
        new DDNameValue(Integer.parseInt(optionIDs[i]), optionValues[i]);
        vecOption.add(tempDDNameValue);
      }
      AppSettings appRemote = appHome.create();
      appRemote.setDataSource(dataSource);
      appRemote.addMasterDataSettings(setting, (Collection) vecOption);

      GlobalMasterLists.refreshGlobalMasterList(dataSource);
      ProjectsHelperList.refreshProjectsHelperList();

      if (button.equals("save")) {
View Full Code Here

          }
        }
      }

      AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject("com.centraview.administration.applicationsettings.AppSettingsHome", "AppSettings");
      AppSettings appRemote = (AppSettings)appHome.create();
      appRemote.setDataSource(dataSource);

      appRemote.addSupportMailId(vecSend);

      HashMap supportMessages = new HashMap();

      appRemote.updateApplicationSettings("DEFAULTOWNER", ownerid);

      // Now handle the "emailCheckInterval" setting...
      {
        Integer formInterval = (Integer)dynaForm.get("emailCheckInterval");
        // call EJB support helper to update DB
View Full Code Here

TOP

Related Classes of com.centraview.administration.applicationsettings.AppSettings

Copyright © 2018 www.massapicom. 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.