Package ru.org.linux.comment

Examples of ru.org.linux.comment.DeleteCommentResult


      throw new UserErrorException("Пользователь уже блокирован");
    }

    Map<String, Object> params = new HashMap<>();
    params.put("message", "Удалено");
    DeleteCommentResult deleteCommentResult = commentService.deleteAllCommentsAndBlock(user, moderator, reason);

    logger.info("User " + user.getNick() + " blocked by " + moderator.getNick());

    params.put("bigMessage",
            "Удалено комментариев: "+deleteCommentResult.getDeletedCommentIds().size()+"<br>"+
            "Удалено тем: "+deleteCommentResult.getDeletedTopicIds().size()
    );

    for (int topicId : deleteCommentResult.getDeletedTopicIds()) {
      searchQueueSender.updateMessage(topicId, true);
    }

    searchQueueSender.updateComment(deleteCommentResult.getDeletedCommentIds());

    return new ModelAndView("action-done", params);
  }
View Full Code Here


    Timestamp ts = new Timestamp(calendar.getTimeInMillis());
    params.put("message", "Удаляем темы и сообщения после "+ts.toString()+" с IP "+ip+"<br>");

    User moderator = tmpl.getCurrentUser();

    DeleteCommentResult deleteResult = commentService.deleteCommentsByIPAddress(ip, ts, moderator, reason);

    params.put("topics", deleteResult.getDeletedTopicIds().size()); // кол-во удаленных топиков
    params.put("deleted", deleteResult.getDeleteInfo());

    for(int topicId : deleteResult.getDeletedTopicIds()) {
      searchQueueSender.updateMessage(topicId, true);
    }

    searchQueueSender.updateComment(deleteResult.getDeletedCommentIds());

    return new ModelAndView("delip", params);
  }
View Full Code Here

TOP

Related Classes of ru.org.linux.comment.DeleteCommentResult

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.