Package net.sourceforge.pebble.comparator

Examples of net.sourceforge.pebble.comparator.BlogEntryComparator


    for (Blog blog : BlogManager.getInstance().getPublicBlogs()) {
      blogEntries.addAll(blog.getRecentPublishedBlogEntries());
    }

    Collections.sort(blogEntries, new BlogEntryComparator());

    if (blogEntries.size() >= numberOfEntries) {
      return new ArrayList<BlogEntry>(blogEntries).subList(0, numberOfEntries);
    } else {
      return new ArrayList<BlogEntry>(blogEntries);
View Full Code Here


        context.setView(ContentDecoratorContext.SUMMARY_VIEW);
        context.setMedia(ContentDecoratorContext.HTML_PAGE);

        List blogEntries = b.getRecentPublishedBlogEntries();
        ContentDecoratorChain.decorate(context, blogEntries);
        Collections.sort(blogEntries, new BlogEntryComparator());
        httpRequest.setAttribute(Constants.RECENT_BLOG_ENTRIES, blogEntries);

        List<Response> recentApprovedResponses = b.getRecentApprovedResponses();
        for (Response r : recentApprovedResponses) {
          if (r instanceof Comment) {
View Full Code Here

    Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);

    response.setContentType("application/xml; charset=" + blog.getCharacterEncoding());

    List<BlogEntry> blogEntries = blog.getBlogEntries();
    Collections.sort(blogEntries, new BlogEntryComparator());
    getModel().put(Constants.BLOG_ENTRIES, blogEntries);

    // set the locale of this feed request to be English
    javax.servlet.jsp.jstl.core.Config.set(
        request,
View Full Code Here

    context.setView(ContentDecoratorContext.SUMMARY_VIEW);
    context.setMedia(ContentDecoratorContext.HTML_PAGE);

    List blogEntries = (List)getModel().get(Constants.BLOG_ENTRIES);
    ContentDecoratorChain.decorate(context, blogEntries);
    Collections.sort(blogEntries, new BlogEntryComparator());
    getModel().put(Constants.BLOG_ENTRIES, blogEntries);
  }
View Full Code Here

    for (Blog blog : BlogManager.getInstance().getPublicBlogs()) {
      blogEntries.addAll(blog.getRecentPublishedBlogEntries());
    }

    Collections.sort(blogEntries, new BlogEntryComparator());

    if (blogEntries.size() >= numberOfEntries) {
      return new ArrayList<BlogEntry>(blogEntries).subList(0, numberOfEntries);
    } else {
      return new ArrayList<BlogEntry>(blogEntries);
View Full Code Here

        context.setView(ContentDecoratorContext.SUMMARY_VIEW);
        context.setMedia(ContentDecoratorContext.HTML_PAGE);

        List<BlogEntry> blogEntries = b.getRecentPublishedBlogEntries();
        ContentDecoratorChain.decorate(context, blogEntries);
        Collections.sort(blogEntries, new BlogEntryComparator());
        httpRequest.setAttribute(Constants.RECENT_BLOG_ENTRIES, blogEntries);

        List<Response> recentApprovedResponses = b.getRecentApprovedResponses();
        for (Response r : recentApprovedResponses) {
          if (r instanceof Comment) {
View Full Code Here

      if (includeAggregatedContent || !entry.isAggregated()) {
        blogEntriesForFeed.add(entry);
      }
    }

    Collections.sort(blogEntriesForFeed, new BlogEntryComparator());

    getModel().put(Constants.BLOG_ENTRIES, blogEntriesForFeed);

    // set the locale of this feed request to be English
    javax.servlet.jsp.jstl.core.Config.set(
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.comparator.BlogEntryComparator

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.