Package net.sourceforge.pebble.web.view

Examples of net.sourceforge.pebble.web.view.NotFoundView


      throw new ServletException(e);
    }
    if (blogEntry == null) {
      // just send back a 404 - this is probably somebody looking for a way
      // to send comment spam ;-)
      return new NotFoundView();
    } else if (!blogEntry.isCommentsEnabled()) {
      return new CommentConfirmationView();
    }

    ContentDecoratorContext decoratorContext = new ContentDecoratorContext();
View Full Code Here


    } catch (BlogServiceException e) {
      throw new ServletException(e);
    }

    if (blogEntry == null) {
      return new NotFoundView();
    }

    if (submit.equals("Edit")) {
      return new ForwardView("/editBlogEntry.secureaction?entry=" + id);
    } else if (submit.equals("Publish") || submit.equals("Unpublish")) {
View Full Code Here

    } catch (BlogServiceException e) {
      throw new ServletException(e);
    }

    if (blogEntry == null) {
      return new NotFoundView();
    }

    if (submit.equals("Publish")) {
      DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT, blog.getLocale());
      dateFormat.setTimeZone(blog.getTimeZone());
View Full Code Here

    if (blogEntry == null) {
      // the entry cannot be found - it may have been removed or the
      // requesting URL was wrong

      return new NotFoundView();
    } else if (!blogEntry.isPublished() && !(SecurityUtils.isUserAuthorisedForBlog(blog))) {
      // the entry exists, but isn't yet published
      return new NotFoundView();
    } else if (!blogEntry.isCommentsEnabled()) {
      getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);
      return new CommentConfirmationView();
    } else {
      getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);
View Full Code Here

    } catch (StaticPageServiceException e) {
      throw new ServletException(e);
    }

    if (staticPage == null) {
      return new NotFoundView();
    }

    if (submit.equals("Edit")) {
      return new ForwardView("/editStaticPage.secureaction?page=" + id);
    } else if (submit.equalsIgnoreCase("Remove") && confirm != null && confirm.equals("true")) {
View Full Code Here

    Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);
    BlogEntry blogEntry;

    String entry = (String)request.getSession().getAttribute(BLOG_ENTRY_ID);
    if (entry == null) {
      return new NotFoundView();
    }

    BlogService service = new BlogService();
    try {
      blogEntry = service.getBlogEntry(blog, entry);
    } catch (BlogServiceException e) {
      throw new ServletException(e);
    }
    if (blogEntry == null) {
      // just send back a 404 - this is probably somebody looking for a way
      // to send comment spam ;-)
      return new NotFoundView();
    } else if (!blogEntry.isTrackBacksEnabled()) {
      return new NotFoundView();
    }
    getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);

    TrackBackConfirmationStrategy strategy = blog.getTrackBackConfirmationStrategy();
View Full Code Here

    } catch (BlogServiceException e) {
      throw new ServletException(e);
    }

    if (blogEntry == null) {
      return new NotFoundView();
    } else {
      getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);
      return new BlogEntryFormView();
    }
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.web.view.NotFoundView

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.