Examples of BlogService


Examples of com.ibm.sbt.services.client.connections.blogs.BlogService

    BasicEndpoint basicEndpoint = (BasicEndpoint) EndpointFactory.getEndpoint(endpointName);
    if (StringUtil.isNotEmpty(user)) {
      basicEndpoint.login(user, password);
    }

    this.blogService = new BlogService();
    this.setEndpoint(basicEndpoint);
  }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.blogs.BlogService

   
    /**
     * Default constructor
     */
    public BlogServiceApp(String url, String user, String password) {
        this.blogService = new BlogService();
        this.blogService.setEndpoint(createEndpoint(url, user, password));
    }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.blogs.BlogService

       
      if(args.length > 3){ // if a blog handle has been provided replace the default one.
      app.setHomepageHandle(args[3]);
    }
      try {
        BlogService BlogService = app.getBlogService();
            EntityList<Blog> blogs = BlogService.getAllBlogs();
            for (Iterator<Blog> iter = blogs.iterator(); iter.hasNext(); ) {
                System.out.println(iter.next().getTitle());
            }
        } catch (ClientServicesException e) {
            e.printStackTrace();
View Full Code Here

Examples of com.renren.api.client.services.BlogService

        this.notificationsService = new NotificationsService(this.renrenApiInvoker);
        this.pageService = new PageService(this.renrenApiInvoker);
        this.payService = new PayService(this.renrenApiInvoker);
        this.photoService = new PhotoService(this.renrenApiInvoker);
        this.feedService = new FeedService(this.renrenApiInvoker);
        this.blogService = new BlogService(this.renrenApiInvoker);
        this.statusService = new StatusService(this.renrenApiInvoker);
    }
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogService

    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.BlogService

  }

  public void testPublishedViewBlogEntry() throws Exception {
    BlogEntry blogEntry1 = new BlogEntry(blog);
    blogEntry1.setPublished(true);
    BlogService service = new BlogService();
    service.putBlogEntry(blogEntry1);

    SecurityUtils.runAsUnauthenticated();
    request.setParameter("entry", blogEntry1.getId());
    View view = action.process(request, response);
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogService

  }

  public void testUnpublishedViewBlogEntryAsAnonymousUser() throws Exception {
    BlogEntry blogEntry1 = new BlogEntry(blog);
    blogEntry1.setPublished(false);
    BlogService service = new BlogService();
    service.putBlogEntry(blogEntry1);

    SecurityUtils.runAsAnonymous();
    request.setParameter("entry", blogEntry1.getId());
    View view = action.process(request, response);
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogService

  }

  public void testUnpublishedViewBlogEntryAsUserThatIsAuthorisedForBlog() throws Exception {
    BlogEntry blogEntry1 = new BlogEntry(blog);
    blogEntry1.setPublished(false);
    BlogService service = new BlogService();
    service.putBlogEntry(blogEntry1);

    SecurityUtils.runAsBlogContributor();
    request.setParameter("entry", blogEntry1.getId());
    View view = action.process(request, response);
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogService

    super.setUp();
  }

  public void testPublishBlogEntryNow() throws Exception {
    BlogService service = new BlogService();
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setDate(new Date(100000));
    blogEntry.setPublished(false);
    service.putBlogEntry(blogEntry);

    // now execute the action
    request.setParameter("entry", blogEntry.getId());
    request.setParameter("publishDate", "now");
    request.setParameter("submit", "Publish");
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogService

    assertTrue(view instanceof RedirectView);
  }

  public void testPublishBlogEntryAsIsAndCheckCommentsStaysIndexed() throws Exception {
    blog.getPluginProperties().setProperty(IpAddressListener.WHITELIST_KEY, "127.0.0.1");
    BlogService service = new BlogService();
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setDate(new Date(100000));
    blogEntry.setPublished(false);
    service.putBlogEntry(blogEntry);

    Comment comment = blogEntry.createComment("title", "body", "author", "email", "website", "avatar", "127.0.0.1");
    blogEntry.addComment(comment);
    service.putBlogEntry(blogEntry);

    String commentId = comment.getGuid();
    assertTrue(blog.getResponseIndex().getApprovedResponses().contains(commentId));

    // now execute the action
    request.setParameter("entry", blogEntry.getId());
    request.setParameter("publishDate", "as-is");
    request.setParameter("submit", "Publish");
    View view = action.process(request, response);

    blogEntry = service.getBlogEntry(blog, blogEntry.getId());
    assertTrue(blogEntry.isPublished());
    assertEquals(new Date(100000), blogEntry.getDate());

    // check that the original comment remains intact
    assertTrue(blog.getResponseIndex().getApprovedResponses().contains(commentId));
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.