Examples of BlogEntry


Examples of de.anomic.data.BlogBoard.BlogEntry

                //set name for new entry or date for old entry
                final String StrSubject = post.get("subject", "");
                byte[] subject;
                subject = UTF8.getBytes(StrSubject);
                final String commentID = String.valueOf(System.currentTimeMillis());
                final BlogEntry blogEntry = sb.blogDB.readBlogEntry(pagename);
                blogEntry.addComment(commentID);
                sb.blogDB.writeBlogEntry(blogEntry);
                sb.blogCommentDB.write(sb.blogCommentDB.newEntry(commentID, subject, author, ip, date, content));
                prop.putHTML("LOCATION","BlogComments.html?page=" + pagename);

                MessageBoard.entry msgEntry = null;
                sb.messageDB.write(msgEntry = sb.messageDB.newEntry(
                        "blogComment",
                        StrAuthor,
                        sb.peers.mySeed().hash,
                        sb.peers.mySeed().getName(), sb.peers.mySeed().hash,
                        "new blog comment: " + UTF8.String(blogEntry.getSubject()), content));

                messageForwardingViaEmail(sb, msgEntry);

                // finally write notification
                final File notifierSource = new File(sb.getAppPath(), sb.getConfig("htRootPath","htroot") + "/env/grafics/message.gif");
View Full Code Here

Examples of domain.BlogEntry

      {

         @Override
         protected void updateModelValues() throws Exception
         {           
            BlogEntry entry = (BlogEntry) getInstance("blogEntry");
            entry.setId("testing");
            entry.setTitle("Integration testing Seam applications is easy!");
            entry.setBody("This post is about SeamTest...");
         }
        
         @Override
         protected void invokeApplication() throws Exception
         {
            // post now returns void
            // assert invokeMethod("#{postAction.post}").equals("/index.xhtml");
            invokeMethod("#{postAction.post}");
            setOutcome("/index.xhtml");
         }
        
         @Override
         protected void afterRequest()
         {
            assert isInvokeApplicationComplete();
            assert !isRenderResponseBegun();
         }
        
      }.run();

      new NonFacesRequest("/index.xhtml")
      {

         @Override
         protected void renderResponse() throws Exception
         {
            List<BlogEntry> blogEntries = ( (Blog) getInstance(BlogService.class) ).getBlogEntries();
            assert blogEntries.size()==4;
            BlogEntry blogEntry = blogEntries.get(0);
            assert blogEntry.getId().equals("testing");
            assert blogEntry.getBody().equals("This post is about SeamTest...");
            assert blogEntry.getTitle().equals("Integration testing Seam applications is easy!");
         }

      }.run();
     
      new FacesRequest()
View Full Code Here

Examples of domain.BlogEntry

         }
        
         @Override
         protected void renderResponse() throws Exception
         {
            BlogEntry blogEntry = (BlogEntry) Contexts.getEventContext().get("blogEntry");
            assert blogEntry!=null;
            assert blogEntry.getId().equals("seamtext");

            // make sure the entry is really there
            assert blogEntry.getBody().length() > 0;
            assert blogEntry.getTitle().equals("Introducing Seam Text");
         }
        
      }.run();
   }
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogEntry

  /**
   * Tests that a single published blog entry can be indexed.
   */
  public void testIndexPublishedBlogEntry() throws Exception {
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setAuthor("sbrown");
    blogEntry.setPublished(true);
    index.index(blogEntry);

    assertTrue(index.getAuthors().contains("sbrown"));
    assertEquals(1, index.getRecentBlogEntries("sbrown").size());
    assertEquals(blogEntry.getId(), index.getRecentBlogEntries("sbrown").get(0));
  }
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogEntry

  /**
   * Tests that a single unpublished blog entry isn't indexed.
   */
  public void testIndexUnpublishedBlogEntry() throws Exception {
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setAuthor("sbrown");
    blogEntry.setPublished(false);
    index.index(blogEntry);

    assertFalse(index.getAuthors().contains("sbrown"));
    assertEquals(0, index.getRecentBlogEntries("sbrown").size());
  }
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogEntry

  /**
   * Tests that a single blog entry can be unindexed.
   */
  public void testUnindexBlogEntry() throws Exception {
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setAuthor("sbrown");
    blogEntry.setPublished(true);
    index.index(blogEntry);

    assertTrue(index.getAuthors().contains("sbrown"));
    assertEquals(1, index.getRecentBlogEntries("sbrown").size());
    assertEquals(blogEntry.getId(), index.getRecentBlogEntries("sbrown").get(0));

    index.unindex(blogEntry);

    assertFalse(index.getAuthors().contains("sbrown"));
    assertEquals(0, index.getRecentBlogEntries("sbrown").size());
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogEntry

  protected void setUp() throws Exception {
    super.setUp();

    decorator = new DisableTrackBacksDecorator();
    blogEntry = new BlogEntry(blog);
  }
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogEntry

  protected void setUp() throws Exception {
    super.setUp();

    decorator = new EscapeMarkupDecorator();
    blogEntry = new BlogEntry(blog);
    staticPage = new StaticPage(blog);
    context = new ContentDecoratorContext();
  }
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogEntry

    super.setUp();

    // default for RelatedPostsDecorator.MAX_POSTS is 5
    blog.getPluginProperties().setProperty(RelatedPostsDecorator.MAX_POSTS, "6");

    blogEntryOne = new BlogEntry(blog);
    blogEntryTwo = new BlogEntry(blog);
    blogEntryThree = new BlogEntry(blog);
    blogEntryFour = new BlogEntry(blog);
    blogEntryFive = new BlogEntry(blog);
    blogEntrySix = new BlogEntry(blog);
    blogEntrySeven = new BlogEntry(blog);
    blogEntryEight = new BlogEntry(blog);

    service = new BlogService();

    decorator = new RelatedPostsDecorator();
    context = new ContentDecoratorContext();
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogEntry

  private ContentDecoratorContext context;

  protected void setUp() throws Exception {
    super.setUp();

    blogEntry = new BlogEntry(blog);
    decorator = new BlogTagsDecorator();
    context = new ContentDecoratorContext();
  }
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.