Package net.sourceforge.pebble.domain

Examples of net.sourceforge.pebble.domain.Day


   * Unindexes a single blog entry.
   *
   * @param blogEntry   a BlogEntry instance
   */
  public synchronized void unindex(BlogEntry blogEntry) {
    Day day = blog.getBlogForDay(blogEntry.getDate());
    day.removeBlogEntry(blogEntry);

    indexEntries.remove(blogEntry.getId());
    publishedIndexEntries.remove(blogEntry.getId());
    unpublishedIndexEntries.remove(blogEntry.getId());

View Full Code Here


        while (indexEntry != null) {
          indexEntries.add(indexEntry);

          // and add it to the internal memory structures
          Date date = new Date(Long.parseLong(indexEntry));
          Day day = blog.getBlogForDay(date);

          if (published) {
            publishedIndexEntries.add(indexEntry);
            day.addPublishedBlogEntry(indexEntry);
          } else {
            unpublishedIndexEntries.add(indexEntry);
            day.addUnpublishedBlogEntry(indexEntry);
          }

          indexEntry = reader.readLine();
        }
View Full Code Here

  /**
   * Tests that a day permalink can be generated.
   */
  public void testGetPermalinkForDay() {
    Day day = blog.getBlogForDay(2004, 07, 14);
    assertEquals("/2004/07/14.html", permalinkProvider.getPermalink(day));
  }
View Full Code Here

  /**
   * Tests thet the correct day can be found from a permalink.
   */
  public void testGetDay() {
    Day day = permalinkProvider.getDay("/2004/07/14.html");
    assertEquals(2004, day.getMonth().getYear().getYear());
    assertEquals(7, day.getMonth().getMonth());
    assertEquals(14, day.getDay());
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.domain.Day

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.