From: <bra...@us...> - 2010-05-18 22:54:16
|
Revision: 3105 http://archive-access.svn.sourceforge.net/archive-access/?rev=3105&view=rev Author: bradtofel Date: 2010-05-18 22:54:10 +0000 (Tue, 18 May 2010) Log Message: ----------- INITIAL REV: Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPReplayRenderer.java Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPReplayRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPReplayRenderer.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPReplayRenderer.java 2010-05-18 22:54:10 UTC (rev 3105) @@ -0,0 +1,79 @@ +/* JSPReplayRenderer + * + * $Id$: + * + * Created on May 7, 2010. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.replay; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.archive.wayback.ReplayRenderer; +import org.archive.wayback.ResultURIConverter; +import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.core.CaptureSearchResults; +import org.archive.wayback.core.Resource; +import org.archive.wayback.core.UIResults; +import org.archive.wayback.core.WaybackRequest; +import org.archive.wayback.exception.WaybackException; + +/** + * ReplayRenderer implementation which just forwards responsibility for + * rendering a resource to a .jsp file. + * + * @author brad + * + */ +public class JSPReplayRenderer implements ReplayRenderer { + private String targetJsp = null; + + public void renderResource(HttpServletRequest httpRequest, + HttpServletResponse httpResponse, WaybackRequest wbRequest, + CaptureSearchResult result, Resource resource, + ResultURIConverter uriConverter, CaptureSearchResults results) + throws ServletException, IOException, WaybackException { + UIResults uiResults = + new UIResults(wbRequest, uriConverter, results, result, resource); + uiResults.forward(httpRequest, httpResponse, targetJsp); + } + + /** + * @return the context-relative path to the .jsp responsible for rendering + * the resource + */ + public String getTargetJsp() { + return targetJsp; + } + + /** + * @param targetJsp the context-relative path to the .jsp responsible for + * rendering the resource + */ + public void setTargetJsp(String targetJsp) { + this.targetJsp = targetJsp; + } + +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |