Package thredds.server.reify
Class UploadController
- java.lang.Object
-
- thredds.server.reify.LoadCommon
-
- thredds.server.reify.UploadController
-
@Controller @RequestMapping({"/upload","/restrictedAccess/upload"}) public class UploadController extends LoadCommonFile upload to a specific directory. As a rule, this needs to coordinate with the upload catalog entry specified in the catalog (see the documentation for upload/download). The tag for this controller is .../upload/*The goal for this controller is to allow external code to have the thredds server upload a file and store it in a specific place.
Assumptions: 1. The external code has authenticated to the thredds server using some authentication mechanism such as client-side certificates or tomcat roles.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class thredds.server.reify.LoadCommon
LoadCommon.SendError
-
-
Field Summary
Fields Modifier and Type Field Description protected static booleanDEBUGprotected booleanissetupprotected thredds.server.reify.Parametersparamsprotected Stringuploaddirnameprotected Stringuploadform-
Fields inherited from class thredds.server.reify.LoadCommon
DEFAULTDOWNLOADFORM, DEFAULTSERVLETNAME, DEFAULTUPLOADFORM, downloaddir, downloaddirname, HTMLLEN, initialized, once, req, requestname, res, server, tdsContext, threddsname, uploaddir
-
-
Constructor Summary
Constructors Constructor Description UploadController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringbuildForm(String msg)voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)voiddoonce(javax.servlet.http.HttpServletRequest req)Invoked once on first request so that everything is available, especially Spring stuff.voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)protected voidsendReply(int code, String msg)voidsetup(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)-
Methods inherited from class thredds.server.reify.LoadCommon
getStackTrace, init, initOnce, inquire, mapToString, parseList, parseMap, reportRequest, sendError, sendError, sendError, sendErrorForm, sendForm, sendOK, urlDecode, urlEncode
-
-
-
-
Field Detail
-
DEBUG
protected static final boolean DEBUG
- See Also:
- Constant Field Values
-
uploaddirname
protected String uploaddirname
-
uploadform
protected String uploadform
-
params
protected thredds.server.reify.Parameters params
-
issetup
protected boolean issetup
-
-
Method Detail
-
doonce
public void doonce(javax.servlet.http.HttpServletRequest req) throws LoadCommon.SendErrorInvoked once on first request so that everything is available, especially Spring stuff.- Throws:
LoadCommon.SendError
-
setup
public void setup(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws LoadCommon.SendError- Throws:
LoadCommon.SendError
-
doGet
@RequestMapping(value="**", method=GET) public void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException- Throws:
javax.servlet.ServletException
-
doPost
@RequestMapping(value="**", method=POST) public void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException- Throws:
javax.servlet.ServletException
-
buildForm
protected String buildForm(String msg)
- Specified by:
buildFormin classLoadCommon
-
sendReply
protected void sendReply(int code, String msg)- Overrides:
sendReplyin classLoadCommon
-
-