Package com.centraview.settings

Examples of com.centraview.settings.SettingsInterface


   */
  public static final boolean fetchLicenseFile(String dataSource)
  {
    boolean returnValue = false;
    try {
      SettingsInterface settings = Settings.getInstance();
      LicenseInstanceVO licenseInstanceVO = new LicenseInstanceVO();
      Properties props = new Properties();

      props.setProperty(PROPS_MAC_KEY, settings.getMACAddress());
      props.setProperty(PROPS_HOST_NAME_KEY, LicenseUtil.getHostName(dataSource));
      props.setProperty(PROPS_TIMESTAMP_KEY, String.valueOf(Calendar.getInstance().getTimeInMillis()));
      String licenseKey = LicenseUtil.getLicenseKey(dataSource);
      if (null == licenseKey) {
        props.setProperty(PROPS_LICENSE_KEY, "");
View Full Code Here


   * edges and hope it doesn't fall off.
   */
  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws RuntimeException, CommunicationException, NamingException
  {
    String host = CVUtility.getHostName(super.getServlet().getServletContext());
    SettingsInterface settings = Settings.getInstance();
    SiteInfo siteInfo = settings.getSiteInfo(host);
    final String dataSource = siteInfo.getDataSource();
    HashMap usrResult;
    UserPrefererences up;
    String formUsername = "";
    String formPassword = "";
View Full Code Here

   */
  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws RuntimeException, Exception
  {
    String host = CVUtility.getHostName(super.getServlet().getServletContext());
    SettingsInterface settings = Settings.getInstance();
    SiteInfo siteInfo = settings.getSiteInfo(host);
    final String dataSource = siteInfo.getDataSource();

    // Set up search bar
    request.setAttribute("showAdvancedSearch", new Boolean(false));
    request.setAttribute("showCustomViews", new Boolean(false));
View Full Code Here

          supportRemote.setDataSource(dataSource);
          supportRemote.setSupportEmailCheckInterval(formInterval.intValue());
        } catch (Exception e) {
          // "Oh we're not gonna take it... No, we ain't gonna take it... Oh we're not gonna take it anymore..."
        }
        SettingsInterface settings = Settings.getInstance();
        // re-schedule JOB because it is currently running and
        // we have changed the interval at which it executes
        TimerTask supportEmailTask = settings.getSupportEmailTask();
        Timer supportEmailTimer = settings.getSupportEmailTimer();
        // cancel the existing timer.
        if (supportEmailTask != null) {
          supportEmailTask.cancel();
        }
        if (supportEmailTimer != null) {
          supportEmailTimer.cancel();
        }
        // only re-schedule the job if the interval is greater than zero
        // a zero value means do not check support email ever
        if (formInterval.intValue() > 0) {
          // minutes to seconds, seconds to miliseconds
          Integer interval = new Integer(formInterval.intValue() * 60 * 1000);
          // then create a new Timer.
          Timer newSupportEmailTimer = new Timer(true);
          // wait a full two minutes for the next execution.
          TimerTask newSupportEmailTask = new SupportEmailCheck(dataSource);
          newSupportEmailTimer.schedule(newSupportEmailTask, 120000L, interval.longValue());
          // And store our reference.
          settings.setSupportEmailTimer(newSupportEmailTimer);
          settings.setSupportEmailTask(newSupportEmailTask);
        }
      } // end of "emailCheckInterval" setting

    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
View Full Code Here

TOP

Related Classes of com.centraview.settings.SettingsInterface

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.