Examples of ReverseBlogEntryIdComparator


Examples of net.sourceforge.pebble.comparator.ReverseBlogEntryIdComparator

   * @param blogEntryId   a blog entry ID
   */
  public synchronized void addBlogEntry(String blogEntryId) {
    if (blogEntryId != null && !blogEntries.contains(blogEntryId)) {
      blogEntries.add(blogEntryId);
      Collections.sort(blogEntries, new ReverseBlogEntryIdComparator());
    }
  }
View Full Code Here

Examples of net.sourceforge.pebble.comparator.ReverseBlogEntryIdComparator

   * @param blogEntry   a blog entry id
   */
  public synchronized void addBlogEntry(String blogEntry) {
    if (blogEntry != null && !blogEntries.contains(blogEntry)) {
      blogEntries.add(blogEntry);
      Collections.sort(blogEntries, new ReverseBlogEntryIdComparator());

      if (getParent() != null) {
        getParent().addBlogEntry(blogEntry);
      }
    }
View Full Code Here

Examples of net.sourceforge.pebble.comparator.ReverseBlogEntryIdComparator

  public synchronized void index(Collection<BlogEntry> blogEntries) {
    for (BlogEntry blogEntry : blogEntries) {
      if (blogEntry.isPublished()) {
        List<String> blogEntryIds = getBlogEntries(blogEntry.getAuthor());
        blogEntryIds.add(blogEntry.getId());
        Collections.sort(blogEntryIds, new ReverseBlogEntryIdComparator());
      }
    }

    writeIndex();
  }
View Full Code Here

Examples of net.sourceforge.pebble.comparator.ReverseBlogEntryIdComparator

   */
  public synchronized void index(BlogEntry blogEntry) {
    if (blogEntry.isPublished()) {
      List<String> blogEntryIds = getBlogEntries(blogEntry.getAuthor());
      blogEntryIds.add(blogEntry.getId());
      Collections.sort(blogEntryIds, new ReverseBlogEntryIdComparator());

      writeIndex();
    }
  }
View Full Code Here

Examples of net.sourceforge.pebble.comparator.ReverseBlogEntryIdComparator

  }

  public synchronized void addPublishedBlogEntry(String blogEntryId) {
    if (!publishedBlogEntries.contains(blogEntryId)) {
      publishedBlogEntries.add(blogEntryId);
      Collections.sort(publishedBlogEntries, new ReverseBlogEntryIdComparator());
    }
    unpublishedBlogEntries.remove(blogEntryId);

    if (!blogEntries.contains(blogEntryId)) {
      // and add to the aggregated view
      blogEntries.add(blogEntryId);
      Collections.sort(blogEntries, new ReverseBlogEntryIdComparator());
    }
  }
View Full Code Here

Examples of net.sourceforge.pebble.comparator.ReverseBlogEntryIdComparator

  }

  public synchronized void addUnpublishedBlogEntry(String blogEntryId) {
    if (!unpublishedBlogEntries.contains(blogEntryId)) {
      unpublishedBlogEntries.add(blogEntryId);
      Collections.sort(unpublishedBlogEntries, new ReverseBlogEntryIdComparator());
    }
    publishedBlogEntries.remove(blogEntryId);

    if (!blogEntries.contains(blogEntryId)) {
      // and add to the aggregated view
      blogEntries.add(blogEntryId);
      Collections.sort(blogEntries, new ReverseBlogEntryIdComparator());
    }
  }
View Full Code Here

Examples of net.sourceforge.pebble.comparator.ReverseBlogEntryIdComparator

        day.addUnpublishedBlogEntry(blogEntry.getId());
      }
      indexEntries.add(blogEntry.getId());
    }

    Collections.sort(indexEntries, new ReverseBlogEntryIdComparator());
    Collections.sort(publishedIndexEntries, new ReverseBlogEntryIdComparator());
    Collections.sort(unpublishedIndexEntries, new ReverseBlogEntryIdComparator());

    writeIndex(true);
    writeIndex(false);
  }
View Full Code Here

Examples of net.sourceforge.pebble.comparator.ReverseBlogEntryIdComparator

      day.addUnpublishedBlogEntry(blogEntry.getId());
      writeIndex(false);
    }
    indexEntries.add(blogEntry.getId());

    Collections.sort(indexEntries, new ReverseBlogEntryIdComparator());
    Collections.sort(publishedIndexEntries, new ReverseBlogEntryIdComparator());
    Collections.sort(unpublishedIndexEntries, new ReverseBlogEntryIdComparator());
  }
View Full Code Here

Examples of net.sourceforge.pebble.comparator.ReverseBlogEntryIdComparator

      } catch (Exception e) {
        log.error("Error while reading index", e);
      }
    }

    Collections.sort(indexEntries, new ReverseBlogEntryIdComparator());
    Collections.sort(publishedIndexEntries, new ReverseBlogEntryIdComparator());
    Collections.sort(unpublishedIndexEntries, new ReverseBlogEntryIdComparator());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.