Пример #1
0
 /**
  * Calculate the number of hour to wait until the first scheduled update check. This will only be
  * called if daily checking for config updates is enabled
  *
  * @return The number of hours to wait
  */
 private int calcHoursToWait() {
   // The hours to wait is the number of hours until midnight tonight (24
   // minus the current hour) plus the hour that the config says updates
   // should be
   return 24
       - Calendar.getInstance().get(Calendar.HOUR_OF_DAY)
       + configuration.getInt(CHECK_FOR_UPDATES_DAILY_TIME_PROP, 0);
 }
Пример #2
0
  /** Constructs MessageSourceService. */
  MessageSourceService(MessageHistoryServiceImpl messageHistoryService) {
    this.messageHistoryService = messageHistoryService;

    ConfigurationService conf = MessageHistoryActivator.getConfigurationService();

    if (conf.getBoolean(IN_HISTORY_PROPERTY, false)) {
      sourceServiceType = HISTORY_TYPE;
    }

    MESSAGE_HISTORY_NAME =
        MessageHistoryActivator.getResources().getI18NString("service.gui.RECENT_MESSAGES");

    numberOfMessages = conf.getInt(NUMBER_OF_RECENT_MSGS_PROP, numberOfMessages);

    isSMSEnabled = conf.getBoolean(IS_MESSAGE_SUBTYPE_SMS_PROP, isSMSEnabled);

    RECENT_MSGS_VER = conf.getString(VER_OF_RECENT_MSGS_PROP, RECENT_MSGS_VER);

    MessageSourceContactPresenceStatus.MSG_SRC_CONTACT_ONLINE.setStatusIcon(
        MessageHistoryActivator.getResources()
            .getImageInBytes("service.gui.icons.SMS_STATUS_ICON"));
  }