Class FileHarvestController
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet
-
- edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet
-
- edu.cornell.mannlib.vitro.webapp.controller.harvester.FileHarvestController
-
- All Implemented Interfaces:
edu.cornell.mannlib.vitro.webapp.controller.MultipartRequestWrapper.ParsingStrategy,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
@WebServlet(name="FileHarvestController", urlPatterns="/harvester/harvest") public class FileHarvestController extends edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringPATH_TO_HARVESTED_DATARelative path from the Harvester root directory to the directory containing the script templates.static StringPATH_TO_HARVESTER_SCRIPTSRelative path from the Harvester root directory to the directory containing the script templates.static StringPATH_TO_TEMPLATE_FILESRelative path from the Harvester root directory to the directory where user-downloadable template files are stored.
-
Constructor Summary
Constructors Constructor Description FileHarvestController()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)static StringgetFileHarvestRootPath(javax.servlet.http.HttpServletRequest req)Returns the path on this machine of the area within Harvester reserved for File Harvest.static StringgetHarvesterPath(javax.servlet.http.HttpServletRequest req)Returns the root location of the VIVO Harvester on this machine.protected StringgetTitle(String siteName, edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)static StringgetUploadPath(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)Gets the location where we want to save uploaded files.longmaximumMultipartFileSize()protected edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValuesprocessRequest(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)booleanstashFileSizeException()-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet
doException, doForward, doGet, doRdf, doRedirect, doResponse, doTemplate, getBeansWrapper, getDisplayModelMenu, getFreemarkerComponentsForJsp, getPageTemplateName, getPageTemplateValues, getThemeDir, handleException, processTemplate, processTemplateToString, requiredActions, wrap, wrap, write, writePage, writeTemplate, writeTemplate
-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet
dumpRequestParameters, isAuthorizedToDisplayPage, redirectToInsufficientAuthorizationPage, redirectToLoginPage, redirectUnauthorizedRequest, service, sortForPickList
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
-
-
-
-
Field Detail
-
PATH_TO_TEMPLATE_FILES
public static final String PATH_TO_TEMPLATE_FILES
Relative path from the Harvester root directory to the directory where user-downloadable template files are stored. Include final slash.- See Also:
- Constant Field Values
-
PATH_TO_HARVESTER_SCRIPTS
public static final String PATH_TO_HARVESTER_SCRIPTS
Relative path from the Harvester root directory to the directory containing the script templates. Include final slash.- See Also:
- Constant Field Values
-
PATH_TO_HARVESTED_DATA
public static final String PATH_TO_HARVESTED_DATA
Relative path from the Harvester root directory to the directory containing the script templates. Include final slash.- See Also:
- Constant Field Values
-
-
Method Detail
-
maximumMultipartFileSize
public long maximumMultipartFileSize()
- Specified by:
maximumMultipartFileSizein interfaceedu.cornell.mannlib.vitro.webapp.controller.MultipartRequestWrapper.ParsingStrategy- Overrides:
maximumMultipartFileSizein classedu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet
-
stashFileSizeException
public boolean stashFileSizeException()
- Specified by:
stashFileSizeExceptionin interfaceedu.cornell.mannlib.vitro.webapp.controller.MultipartRequestWrapper.ParsingStrategy- Overrides:
stashFileSizeExceptionin classedu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet
-
processRequest
protected edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues processRequest(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)
- Overrides:
processRequestin classedu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet
-
getTitle
protected String getTitle(String siteName, edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)
- Overrides:
getTitlein classedu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet
-
getHarvesterPath
public static String getHarvesterPath(javax.servlet.http.HttpServletRequest req)
Returns the root location of the VIVO Harvester on this machine.- Returns:
- the root location of the VIVO Harvester on this machine
-
getFileHarvestRootPath
public static String getFileHarvestRootPath(javax.servlet.http.HttpServletRequest req)
Returns the path on this machine of the area within Harvester reserved for File Harvest.- Returns:
- the path on this machine of the area within Harvester reserved for File Harvest
-
getUploadPath
public static String getUploadPath(edu.cornell.mannlib.vitro.webapp.controller.VitroRequest vreq)
Gets the location where we want to save uploaded files. This location is in the VIVO uploads directory under "harvester", and then in a directory named by the user's session ID as retrieved from the request. The path returned by this method will end in a slash (/).- Parameters:
vreq- the request from which to get the session ID- Returns:
- the path to the location where uploaded files will be saved. This path will end in a slash (/)
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException- Overrides:
doPostin classedu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet- Throws:
IOExceptionjavax.servlet.ServletException
-
-