Package net.sourceforge.pebble.domain

Examples of net.sourceforge.pebble.domain.BlogManager


   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);
    BlogManager blogManager = BlogManager.getInstance();
    String blogId = request.getParameter("id");

    if (blogId != null && blogId.length() > 0 && blogId.matches("[\\w-~]*") && blogManager.getBlog(blogId) == null) {
      blogManager.addBlog(blogId);
    }

    return new RedirectView(blog.getUrl() + "viewBlogs.secureaction");
  }
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 {
    BlogManager blogManager = BlogManager.getInstance();
    getModel().put(Constants.BLOGS, blogManager.getBlogs());

    return new BlogsView();
  }
View Full Code Here

   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);
    BlogManager blogManager = BlogManager.getInstance();
    String blogId = request.getParameter("id");

    Configuration config = PebbleContext.getInstance().getConfiguration();
    String regex = (config.isVirtualHostingEnabled() && !config.isVirtualHostingSubdomain()) ? "[\\.\\w-~]*" : "[\\w-~]*";
   
    if (blogId != null && blogId.length() > 0 && blogId.matches(regex) && blogManager.getBlog(blogId) == null) {
      blogManager.addBlog(blogId);
    }

    return new RedirectView(blog.getUrl() + "viewBlogs.secureaction");
  }
View Full Code Here

TOP

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

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.