Examples of TrackBackConfirmationStrategy


Examples of net.sourceforge.pebble.api.confirmation.TrackBackConfirmationStrategy

    } else if (!blogEntry.isTrackBacksEnabled()) {
      return new NotFoundView();
    }
    getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);

    TrackBackConfirmationStrategy strategy = blog.getTrackBackConfirmationStrategy();

    if (strategy.confirmationRequired(blog)) {
      request.getSession().setAttribute(BLOG_ENTRY_ID, blogEntry.getId());
      strategy.setupConfirmation(request);
      return new ConfirmTrackBackView();
    } else {
      generateTrackBackLink(blogEntry);
      return new TrackBackLinkView();
    }
View Full Code Here

Examples of net.sourceforge.pebble.api.confirmation.TrackBackConfirmationStrategy

   *
   * @return the URI as a String
   */
  public String getUri() {
    Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);
    TrackBackConfirmationStrategy strategy = blog.getTrackBackConfirmationStrategy();
    return strategy.getUri();
  }
View Full Code Here

Examples of net.sourceforge.pebble.api.confirmation.TrackBackConfirmationStrategy

    } else if (!blogEntry.isTrackBacksEnabled()) {
      return new NotFoundView();
    }
    getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);

    TrackBackConfirmationStrategy strategy = blog.getTrackBackConfirmationStrategy();

    if (strategy.isConfirmed(request)) {
      generateTrackBackLink(blogEntry);
      request.getSession().removeAttribute(BLOG_ENTRY_ID);
      return new TrackBackLinkView();
    } else {
      // try again!
      strategy.setupConfirmation(request);
      return new ConfirmTrackBackView();
    }
  }
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.