Package thredds.server.reify
Class LoadCommon
- java.lang.Object
-
- thredds.server.reify.LoadCommon
-
- Direct Known Subclasses:
DownloadController,UploadController
public abstract class LoadCommon extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLoadCommon.SendError
-
Field Summary
Fields Modifier and Type Field Description protected static booleanDEBUGprotected static StringDEFAULTDOWNLOADFORMprotected static StringDEFAULTSERVLETNAMEprotected static StringDEFAULTUPLOADFORMprotected Stringdownloaddirprotected Stringdownloaddirnameprotected static intHTMLLENprotected booleaninitializedprotected booleanonceprotected javax.servlet.http.HttpServletRequestreqprotected Stringrequestnameprotected javax.servlet.http.HttpServletResponseresprotected Stringserverprotected TdsContexttdsContextprotected Stringthreddsnameprotected Stringuploaddir
-
Constructor Summary
Constructors Constructor Description LoadCommon()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringbuildForm(String msg)static StringgetStackTrace(Exception e)voidinit()voidinitOnce(javax.servlet.http.HttpServletRequest req)Invoked on first get so that everything is available, especially Spring stuff.protected Stringinquire()static StringmapToString(Map<String,String> map, boolean encode, String... order)static List<String>parseList(String params, char sep, boolean decode)static Map<String,String>parseMap(String params, char sep, boolean decode)protected static voidreportRequest(javax.servlet.http.HttpServletRequest req)protected voidsendError(int code, String msg)protected voidsendError(int code, String msg, Throwable e)protected voidsendError(LoadCommon.SendError se)protected voidsendErrorForm(int code, String err)protected voidsendForm(String msg)protected voidsendOK(String msg)protected voidsendReply(int code, String msg)static StringurlDecode(String s)static StringurlEncode(String s)
-
-
-
Field Detail
-
DEBUG
protected static final boolean DEBUG
- See Also:
- Constant Field Values
-
DEFAULTSERVLETNAME
protected static final String DEFAULTSERVLETNAME
- See Also:
- Constant Field Values
-
HTMLLEN
protected static int HTMLLEN
-
DEFAULTUPLOADFORM
protected static final String DEFAULTUPLOADFORM
- See Also:
- Constant Field Values
-
DEFAULTDOWNLOADFORM
protected static final String DEFAULTDOWNLOADFORM
- See Also:
- Constant Field Values
-
tdsContext
@Autowired protected TdsContext tdsContext
-
initialized
protected boolean initialized
-
once
protected boolean once
-
req
protected javax.servlet.http.HttpServletRequest req
-
res
protected javax.servlet.http.HttpServletResponse res
-
server
protected String server
-
requestname
protected String requestname
-
threddsname
protected String threddsname
-
uploaddir
protected String uploaddir
-
downloaddir
protected String downloaddir
-
downloaddirname
protected String downloaddirname
-
-
Method Detail
-
mapToString
public static String mapToString(Map<String,String> map, boolean encode, String... order)
-
init
public void init() throws javax.servlet.ServletException- Throws:
javax.servlet.ServletException
-
initOnce
public void initOnce(javax.servlet.http.HttpServletRequest req) throws LoadCommon.SendErrorInvoked on first get so that everything is available, especially Spring stuff.- Throws:
LoadCommon.SendError
-
inquire
protected String inquire()
-
sendForm
protected void sendForm(String msg)
-
sendErrorForm
protected void sendErrorForm(int code, String err)
-
sendOK
protected void sendOK(String msg)
-
sendError
protected void sendError(int code, String msg)
-
sendError
protected void sendError(LoadCommon.SendError se)
-
sendReply
protected void sendReply(int code, String msg)
-
reportRequest
protected static void reportRequest(javax.servlet.http.HttpServletRequest req)
-
-