Package org.javlo.service
Class RequestService
- java.lang.Object
-
- org.javlo.service.RequestService
-
public class RequestService extends Object
-
-
Constructor Summary
Constructors Constructor Description RequestService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<org.apache.commons.fileupload.FileItem>
getAllFileItem()
static String
getAttribute(javax.servlet.http.HttpServletRequest request, String key, String defaultValue)
String
getBody()
org.apache.commons.fileupload.FileItem
getFileItem(String key)
Map<String,org.apache.commons.fileupload.FileItem[]>
getFileItemMap()
org.apache.commons.fileupload.FileItem[]
getFileItems(String key)
org.apache.commons.fileupload.FileItem
getFirstFileItem()
static RequestService
getInstance(javax.servlet.http.HttpServletRequest request)
String
getParameter(String key)
String
getParameter(String key, String outDefault)
Map<String,String>
getParameterForAttributeMap()
Map<String,Map<String,String>>
getParameterForAttributesMap()
List<String>
getParameterListValues(String key)
List<String>
getParameterListValues(String key, List<String> defaultValue)
Map<String,Object>
getParameterMap()
Map<String,String[]>
getParametersMap()
String[]
getParameterValues(String key)
String[]
getParameterValues(String key, String[] defaultValue)
javax.servlet.http.HttpServletRequest
getRequest()
static String
getURI(javax.servlet.http.HttpServletRequest request)
void
putParameter(String key, String value)
boolean
removeParameter(String name)
void
restoreParameters()
restore saved parameters after operations on request.void
saveParameters()
store parameter interal for restore after operations on request.void
setParameter(String key, String value)
-
-
-
Method Detail
-
getInstance
public static RequestService getInstance(javax.servlet.http.HttpServletRequest request)
-
getParameterListValues
public List<String> getParameterListValues(String key, List<String> defaultValue)
-
getFileItem
public org.apache.commons.fileupload.FileItem getFileItem(String key)
-
getFileItems
public org.apache.commons.fileupload.FileItem[] getFileItems(String key)
-
getAllFileItem
public Collection<org.apache.commons.fileupload.FileItem> getAllFileItem()
-
getFirstFileItem
public org.apache.commons.fileupload.FileItem getFirstFileItem()
-
getAttribute
public static String getAttribute(javax.servlet.http.HttpServletRequest request, String key, String defaultValue)
-
getURI
public static String getURI(javax.servlet.http.HttpServletRequest request)
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest()
-
saveParameters
public void saveParameters()
store parameter interal for restore after operations on request.
-
restoreParameters
public void restoreParameters()
restore saved parameters after operations on request.
-
removeParameter
public boolean removeParameter(String name)
-
getBody
public String getBody() throws IOException
- Throws:
IOException
-
-