Package com.simplicite.webapp.tools
Class ServletParameters
- java.lang.Object
-
- com.simplicite.util.tools.Parameters
-
- com.simplicite.webapp.tools.ServletParameters
-
- All Implemented Interfaces:
java.io.Serializable
public class ServletParameters extends Parameters
Structure to store HTTP request parameters (from mono and multi-part form)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.simplicite.util.tools.Parameters
Parameters.ContextParam, Parameters.DocParam, Parameters.InlineParam, Parameters.TreeviewParam
-
-
Constructor Summary
Constructors Constructor Description ServletParameters(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Constructor, loads HTTP request parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getLogin()
Deprecated.Use getLoginFromRequestjava.lang.String
getLoginFromRequest()
Get login from requestjavax.servlet.http.HttpServletRequest
getRequest()
Get HTTP requestjavax.servlet.http.HttpServletResponse
getResponse()
Get HTTP responsejavax.servlet.http.HttpSession
getSession()
Get HTTP sessionjava.lang.String
getSessionId()
Get session IDvoid
loadParameters()
Load the request parametersorg.json.JSONObject
toJSONObject()
Get parameters as JSON objectjava.lang.String
toString()
Get parameters as human-readable string-
Methods inherited from class com.simplicite.util.tools.Parameters
getAcceptLanguage, getBackLocation, getBaseLocation, getBaseURI, getBody, getBooleanParameter, getBooleanParameter, getCharset, getContentType, getContextParam, getContextURL, getDocParameters, getDocument, getDocuments, getDoubleParameter, getDoubleParameter, getElapsedTime, getFloatParameter, getFloatParameter, getHeader, getHeaders, getIntParameter, getIntParameter, getJSONArray, getJSONObject, getLocation, getLocation, getLocation, getLocation, getLocationParts, getLocationParts, getLocationURL, getLongParameter, getLongParameter, getMethod, getMultiDocParameters, getMultiParameters, getParameter, getParameter, getParameters, getParameters, getParameters, getParentOrViewParameter, getParentParameter, getPrefixParameterNames, getPrefixParameters, getQueryString, getRoot, getRowId, getServerURL, getTreeViewParameter, getURI, getURIParts, getURIParts, getUserAgent, getViewParameter, has, hasDocParam, hasFilterParam, hasFilterParam, hasMultiParam, hasParam, hasPrefixParameters, isBinaryRequest, isDelete, isDELETE, isFormURLEncodedRequest, isGet, isGET, isHead, isHEAD, isJSONRequest, isPatch, isPATCH, isPost, isPOST, isPut, isPUT, isURLFormEncodedRequest, isXMLRequest, parseJSONBody, remove, setAcceptLanguage, setBackLocation, setBody, setCharset, setContentType, setContextURL, setDocument, setDocuments, setHeader, setJSONArray, setJSONObject, setLocation, setLocationURL, setMethod, setParameter, setParameters, setRoot, setServerURL, setTime, setUserAgent, toJSON
-
-
-
-
Constructor Detail
-
ServletParameters
public ServletParameters(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws ParamsException
Constructor, loads HTTP request parameters- Parameters:
request
- HTTP requestresponse
- HTTP response- Throws:
ParamsException
-
-
Method Detail
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest()
Get HTTP request- Returns:
- HTTP request
-
getResponse
public javax.servlet.http.HttpServletResponse getResponse()
Get HTTP response- Returns:
- HTTP response
-
getSession
public javax.servlet.http.HttpSession getSession()
Get HTTP session- Returns:
- HTTP session
-
getSessionId
public java.lang.String getSessionId()
Get session ID- Returns:
- Session ID
-
getLogin
@Deprecated(forRemoval=false, since="4.0") public java.lang.String getLogin()
Deprecated.Use getLoginFromRequest
-
getLoginFromRequest
public java.lang.String getLoginFromRequest()
Get login from request- Returns:
- Login if found in request
-
loadParameters
public void loadParameters() throws ParamsException
Load the request parameters- Throws:
ParamsException
- If parameter loading fails
-
toJSONObject
public org.json.JSONObject toJSONObject()
Get parameters as JSON object- Overrides:
toJSONObject
in classParameters
- Returns:
- Parameters JSON object
-
toString
public java.lang.String toString()
Get parameters as human-readable string- Overrides:
toString
in classParameters
- Returns:
- Parameters as string
-
-