Package ru.org.linux.group

Examples of ru.org.linux.group.Group


    String groupName,
    HttpServletResponse response
  ) throws Exception {
    Section section = sectionService.getSection(topicListForm.getSection());

    Group group = groupDao.getGroup(section, groupName);

    ModelAndView modelAndView = mainTopicsFeedHandler(
      request,
      topicListForm,
      response,
      group
    );

    StringBuilder ptitle = new StringBuilder();

    ptitle.append(section.getName());
    if (group != null) {
      ptitle.append(" - ").append(group.getTitle());
    }

    modelAndView.addObject("ptitle", ptitle.toString());

    modelAndView.addObject("url", group.getUrl());

    return modelAndView;
  }
View Full Code Here


  private void updateMessage(Topic topic) {
    Map<String, Object> doc = new HashMap<>();

    Section section = sectionService.getSection(topic.getSectionId());
    Group group = groupDao.getGroup(topic.getGroupId());
    User author = userDao.getUserCached(topic.getUid());

    doc.put("section", section.getUrlName());
    doc.put("topic_author", author.getNick());
    doc.put("topic_id", topic.getId());
    doc.put("author", author.getNick());
    doc.put("group", group.getUrlName());

    doc.put("title", topic.getTitleUnescaped());
    doc.put("topic_title", topic.getTitleUnescaped());
    doc.put("message", lorCodeService.extractPlainText(msgbaseDao.getMessageText(topic.getId())));
    Date postdate = topic.getPostdate();
View Full Code Here

  private IndexRequestBuilder processComment(Topic topic, Comment comment, String message) {
    Map<String, Object> doc = new HashMap<>();

    Section section = sectionService.getSection(topic.getSectionId());
    Group group = groupDao.getGroup(topic.getGroupId());
    User author = userDao.getUserCached(comment.getUserid());
    User topicAuthor = userDao.getUserCached(topic.getUid());

    doc.put("section", section.getUrlName());
    doc.put("topic_author", topicAuthor.getNick());
    doc.put("topic_id", topic.getId());
    doc.put("author", author.getNick());
    doc.put("group", group.getUrlName());

    String topicTitle = topic.getTitleUnescaped();
    doc.put("topic_title", topicTitle);
   
    String commentTitle = comment.getTitle();
View Full Code Here

    URI mainURI = new URI("http://www.linux.org.ru/", true, "UTF-8");

    TopicDao messageDao = mock(TopicDao.class);
    Topic message1 = mock(Topic.class);
    Group group1 = mock(Group.class);
    Topic message2 = mock(Topic.class);
    Group group2 = mock(Group.class);
    Topic message3 = mock(Topic.class);
    Group group3 = mock(Group.class);
    Topic message12 = mock(Topic.class);
    Group group12 = mock(Group.class);
    Topic message15 = mock(Topic.class);
    Group group15 = mock(Group.class);
    Topic messageHistory = mock(Topic.class);
    Group groupHistory = mock(Group.class);
    CommentService commentService = mock(CommentService.class);

    Comment comment = mock(Comment.class);

    when(message1.getTitle()).thenReturn("привет1");
    when(message2.getTitle()).thenReturn("привет2");
    when(message3.getTitle()).thenReturn("привет3");
    when(message12.getTitle()).thenReturn("привет12");
    when(message15.getTitle()).thenReturn("привет15");
    when(messageHistory.getTitle()).thenReturn("привет история");
    when(group1.getUrl()).thenReturn("/news/debian/");
    when(group2.getUrl()).thenReturn("/forum/talks/");
    when(group3.getUrl()).thenReturn("/forum/general/");
    when(group12.getUrl()).thenReturn("/forum/security/");
    when(group15.getUrl()).thenReturn("/forum/linux-org-ru/");
    when(groupHistory.getUrl()).thenReturn("/news/kernel/");
    when(messageDao.getGroup(message1)).thenReturn(group1);
    when(messageDao.getGroup(message2)).thenReturn(group2);
    when(messageDao.getGroup(message3)).thenReturn(group3);
    when(messageDao.getGroup(message12)).thenReturn(group12);
    when(messageDao.getGroup(message15)).thenReturn(group15);
View Full Code Here

TOP

Related Classes of ru.org.linux.group.Group

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.