コード例 #1
0
  @Override
  public void sendEmail() {
    // At this time all data have gathered, if it exists of course

    if (Configuration.isEmailSendingEnabled()) {

      if (emailConnectionValidator.isConnectionActivated())
        if (emailConnectionValidator.validConnection()) {

          List<EmailNotification> notifications =
              emailNotificationModel.getAllByType(
                  EmailTemplateEnum.TEMPLATE_RESOURCE_REMOVED_FROM_TASK);

          for (int i = 0; i < notifications.size(); i++)
            if (composeMessageForUser(notifications.get(i)))
              deleteSingleNotification(notifications.get(i));
        }
    }
  }
コード例 #2
0
 private void deleteSingleNotification(EmailNotification notification) {
   emailNotificationModel.deleteById(notification);
 }