Class RequestParameterParser


  • public class RequestParameterParser
    extends Object
    • Constructor Detail

      • RequestParameterParser

        public RequestParameterParser()
    • Method Detail

      • parameters

        public static ParameterWrapper parameters​(javax.servlet.http.HttpServletRequest req)
      • parseHeaderParameters

        public static void parseHeaderParameters​(ParameterWrapper parameterWrapper,
                                                 javax.servlet.http.HttpServletRequest request)
      • parseMultipart

        public static List<org.apache.commons.fileupload.FileItem> parseMultipart​(javax.servlet.http.HttpServletRequest req)
                                                                           throws org.apache.commons.fileupload.FileUploadException
        Parses a multipart request. Compared with parseMultipartParameters(ParameterWrapper, HttpServletRequest), this method does not apply special handling for FORMCYCLE related field names and simply returns the parsed file items. It also does not check whether files contain any data, this should be done by the caller.
        Parameters:
        req - Request to parse.
        Returns:
        A list of file items.
        Throws:
        org.apache.commons.fileupload.FileUploadException - When the request could not be parsed.
      • parseMultipart

        public static List<org.apache.commons.fileupload.FileItem> parseMultipart​(javax.servlet.http.HttpServletRequest req,
                                                                                  Predicate<String> fieldFilter)
                                                                           throws org.apache.commons.fileupload.FileUploadException
        Parses a multipart request. Compared with parseMultipartParameters(ParameterWrapper, HttpServletRequest), this method does not apply special handling for FORMCYCLE related field names and simply returns the parsed file items. It also does not check whether files contain any data, this should be done by the caller.
        Parameters:
        req - Request to parse.
        fieldFilter - Predicate that is given the name of each submitted form field. When it returns false, that field is discarded.
        Returns:
        A list of file items.
        Throws:
        org.apache.commons.fileupload.FileUploadException - When the request could not be parsed.
      • parseMultipartParameters

        public static ParameterWrapper parseMultipartParameters​(ParameterWrapper parameters,
                                                                javax.servlet.http.HttpServletRequest req)
                                                         throws org.apache.commons.fileupload.FileUploadException
        Throws:
        org.apache.commons.fileupload.FileUploadException
      • parseMultipartParameters

        public static ParameterWrapper parseMultipartParameters​(ParameterWrapper parameters,
                                                                javax.servlet.http.HttpServletRequest req,
                                                                Predicate<String> fieldFilter)
                                                         throws org.apache.commons.fileupload.FileUploadException
        Throws:
        org.apache.commons.fileupload.FileUploadException