Class QuerystringToRecordParser

java.lang.Object
io.github.grumpystuff.grumpyrest.request.querystring.QuerystringToRecordParser
All Implemented Interfaces:
QuerystringParser

public final class QuerystringToRecordParser extends Object implements QuerystringParser
This class implements an auto-generated record parser.
  • Method Details

    • supportsType

      public boolean supportsType(Type type)
      Description copied from interface: QuerystringParser
      Checks if this parser supports the specified type.
      Specified by:
      supportsType in interface QuerystringParser
      Parameters:
      type - the type to check
      Returns:
      true if supported, false if not
    • parse

      public Object parse(Map<String,String> querystring, Type recordType) throws QuerystringParsingException
      Description copied from interface: QuerystringParser
      Converts the querystring to an application object.
      Specified by:
      parse in interface QuerystringParser
      Parameters:
      querystring - the querystring to convert, pre-parsed into key/value pairs by the servlet container
      recordType - the type to parse as
      Returns:
      the parsed object
      Throws:
      QuerystringParsingException - on parsing errors, such as wrongly formatted fields, unknown fields, missing fields or duplicate fields