Package net.sourceforge.pebble.domain

Examples of net.sourceforge.pebble.domain.Blog


        username + ", " +
        "********)");
    log.debug(" name = " + struct.get(NAME));
    log.debug(" type = " + struct.get(TYPE));

    Blog blog = getBlogWithBlogId(blogid);
    authenticate(blog, username, password);

    Hashtable ht = new Hashtable();

    String name = (String)struct.get(NAME);
View Full Code Here


    log.debug("metaWeblog.getCategories(" +
        blogid + ", " +
        username + ", " +
        "********)");

    Blog blog = getBlogWithBlogId(blogid);
    authenticate(blog, username, password);

    Hashtable categories = new Hashtable();
    Iterator it = blog.getCategories().iterator();
    Category category;
    while (it.hasNext()) {
      category = (Category)it.next();
      if (!category.isRootCategory()) {
        Hashtable struct = new Hashtable();
        struct.put(DESCRIPTION, category.getId());
        struct.put(HTML_URL, category.getPermalink());
        struct.put(RSS_URL, blog.getUrl() + "rss.xml?category=" + category.getId());
        categories.put(category.getId(), struct);
      }
    }

    return categories;
View Full Code Here

    log.debug("metaWeblog.getRecentPosts(" +
        blogid + ", " +
        username + ", " +
        "********)");

    Blog blog = getBlogWithBlogId(blogid);
    authenticate(blog, username, password);

    Vector posts = new Vector();
    Collection coll = blog.getRecentBlogEntries(numberOfPosts);

    Iterator it = coll.iterator();
    BlogEntry entry;
    while (it.hasNext()) {
      entry = (BlogEntry)it.next();
View Full Code Here

    log.debug("metaWeblog.getPost(" +
        postid + ", " +
        username + ", " +
        "********)");

    Blog blog = getBlogWithPostId(postid);
    postid = getPostId(postid);
    authenticate(blog, username, password);
    BlogService service = new BlogService();
    BlogEntry entry = null;
    try {
View Full Code Here

        "********, " +
        struct + ", " +
        publish + ")");

    try {
      Blog blog = getBlogWithBlogId(blogid);
      authenticate(blog, username, password);

      BlogEntry entry = new BlogEntry(blog);

      if (struct.containsKey(PUB_DATE)) {
View Full Code Here

        "********, " +
        struct + ", " +
        publish + ")");

    try {
      Blog blog = getBlogWithPostId(postid);
      postid = getPostId(postid);
      authenticate(blog, username, password);
      BlogService service = new BlogService();
      BlogEntry entry = service.getBlogEntry(blog, postid);

View Full Code Here

      config.setUrl("http://www.yourdomain.com/blog/");
      PebbleContext.getInstance().setConfiguration(config);
    }

    DAOFactory.setConfiguredFactory(new FileDAOFactory());
    Blog blog = new Blog(args[1]);
    blog.setProperty(Blog.TIMEZONE_KEY, args[2]);

    importBlog(blog, file);
  }
View Full Code Here

   * @param request  the HttpServletRequest instance
   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    final Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);

    String type = request.getParameter("type");
    if (type == null) {
      type = "approved";
    }

    String pageAsString = request.getParameter("page");
    int page = 1;
    if (pageAsString == null || pageAsString.length() == 0) {
      page = 1;
    } else {
      try {
        page = Integer.parseInt(pageAsString);
      } catch (NumberFormatException nfe) {
      }
    }

    List responses = null;
    if (type.equalsIgnoreCase("pending")) {
      responses = new ArrayList(blog.getPendingResponses());
    } else if (type.equalsIgnoreCase("rejected")) {
      responses = new ArrayList(blog.getRejectedResponses());
    } else {
      responses = new ArrayList(blog.getApprovedResponses());
    }

    Pageable pageable = new Pageable(responses) {
      public List getListForPage() {
        List responses = new ArrayList();
View Full Code Here

   * @param request  the HttpServletRequest instance
   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);
    Log log = getLog(request, response);

    Set<String> countries = new TreeSet<String>(new Comparator<String>() {
      public int compare(String s1, String s2) {
        return s1 != null ? s1.compareToIgnoreCase(s2) : -1;
View Full Code Here

   * @param request  the HttpServletRequest instance
   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);
    StaticPageService service = new StaticPageService();
    try {
      getModel().put("staticPages", service.getStaticPages(blog));
    } catch (StaticPageServiceException e) {
      throw new ServletException(e);
View Full Code Here

TOP

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

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.