From a4223e7ac6e8a8384c3d14fc38628b6e2291db5d Mon Sep 17 00:00:00 2001 From: jeb228 Date: Thu, 24 Feb 2011 17:52:30 +0000 Subject: [PATCH] NIHVIVO-1261 Pass the ServletContext down the chain to FileServingHelper, to prepare for the change in ConfigurationProperties. --- .../freemarker/utilities/UtilitiesRequestHandler.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/utilities/UtilitiesRequestHandler.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/utilities/UtilitiesRequestHandler.java index 726aa2fa..8796cb66 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/utilities/UtilitiesRequestHandler.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/utilities/UtilitiesRequestHandler.java @@ -108,7 +108,7 @@ public class UtilitiesRequestHandler implements VisualizationRequestHandler { Dataset, log); return getThumbnailInformation(imageQueryHandler.getQueryResult(), - fieldLabelToOutputFieldLabel); + fieldLabelToOutputFieldLabel, vitroRequest); } else if (VisualizationFrameworkConstants.ARE_PUBLICATIONS_AVAILABLE_UTILS_VIS_MODE .equalsIgnoreCase(visMode)) { @@ -370,7 +370,8 @@ public class UtilitiesRequestHandler implements VisualizationRequestHandler { private String getThumbnailInformation(ResultSet resultSet, - Map fieldLabelToOutputFieldLabel) { + Map fieldLabelToOutputFieldLabel, + VitroRequest vitroRequest) { String finalThumbNailLocation = ""; @@ -387,7 +388,8 @@ public class UtilitiesRequestHandler implements VisualizationRequestHandler { finalThumbNailLocation = FileServingHelper .getBytestreamAliasUrl(downloadLocationNode.toString(), - fileNameNode.toString()); + fileNameNode.toString(), + vitroRequest.getSession().getServletContext()); } } return finalThumbNailLocation;