Package: grails.web.servlet.mvc

## [Java] Class GrailsParameterMap

- grails.web.servlet.mvc.GrailsParameterMap

- All Implemented Interfaces and Traits:
    java.lang.Cloneable

      @java.lang.SuppressWarnings({ "rawtypes", "unchecked" })
      public class GrailsParameterMap
      extends TypeConvertingMap
      implements java.lang.Cloneable

  A parameter map class that allows mixing of request parameters and controller parameters. If a controller parameter is set with the same name as a request parameter the controller parameter value is retrieved.

  Authors:
    Graeme Rocher
    Lari Hotari
  Since:
    Oct 24, 2005

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static java.util.Map<java.lang.String, java.lang.String>` | `CACHED_DATE_FORMATS` |
    `static java.lang.Object[]` | `EMPTY_ARGS` |
    `private static org.slf4j.Logger` | `LOG` |
    `static java.lang.String` | `REQUEST_BODY_PARSED` |
    `private java.util.Map` | `nestedDateMap` |
    `private javax.servlet.http.HttpServletRequest` | `request` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractTypeConvertingMap` | `DEFAULT_DATE_FORMAT, wrappedMap`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsParameterMap (java.util.Map values, javax.servlet.http.HttpServletRequest request)` Does not populate the GrailsParameterMap from the request but instead uses the supplied values.
    `GrailsParameterMap (javax.servlet.http.HttpServletRequest request)` Creates a GrailsParameterMap populating from the given request object

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `addParametersFrom(GrailsParameterMap otherMap)`
    `` | `public java.lang.Object` | `clone()`
    `` | `public java.lang.Object` | `get(java.lang.Object key)`
    `` | `public java.util.Date` | `getDate(java.lang.String name)` Obtains a date for the parameter name using the default format
    `` | `public java.lang.Object` | `getIdentifier()` Returns: The identifier in the request
    `` | `private java.lang.Object` | `getParameterValue(java.util.Map requestMap, java.lang.String key)`
    `` | `public javax.servlet.http.HttpServletRequest` | `getRequest()` Returns: Returns the request.
    `` | `private java.util.Date` | `lazyEvaluateDateParam(java.lang.Object key)`
    `` | `private java.lang.String` | `lookupFormat(java.lang.String name)`
    `` | `private void` | `processNestedKeys(java.util.Map requestMap, java.lang.String key, java.lang.String nestedKey, java.util.Map nestedLevel)`
    `` | `public java.lang.Object` | `put(java.lang.Object key, java.lang.Object value)`
    `` | `public void` | `putAll(java.util.Map map)`
    `` | `public java.lang.Object` | `remove(java.lang.Object key)`
    `` | `public java.lang.String` | `toQueryString()` Converts this parameter map into a query String.
    `` | `protected void` | `updateNestedKeys(java.util.Map keys)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class TypeConvertingMap` | `boolean, boolean, byte, byte, char, char, char, clone, double, double, float, float, int, int, long, long, short, short`
    `class AbstractTypeConvertingMap` | `asBoolean, clear, containsKey, containsValue, date, date, date, entrySet, equals, equals, get, getBoolean, getBoolean, getByte, getByte, getChar, getChar, getDate, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getList, getLong, getLong, getShort, getShort, hashCode, isEmpty, keySet, list, put, putAll, remove, size, toString, values`

- - ### Field Detail

    - #### private static final java.util.Map<java.lang.String, java.lang.String> CACHED_DATE_FORMATS

    - #### public static final java.lang.Object[] EMPTY_ARGS

    - #### private static final org.slf4j.Logger LOG

    - #### public static final java.lang.String REQUEST_BODY_PARSED

    - #### private final java.util.Map nestedDateMap

    - #### private final javax.servlet.http.HttpServletRequest request

  - ### Constructor Detail

    - #### public GrailsParameterMap(java.util.Map values, javax.servlet.http.HttpServletRequest request)

      Does not populate the GrailsParameterMap from the request but instead uses the supplied values.

      Parameters:
        `values` - The values to populate with
        `request` - The request object

    - #### public GrailsParameterMap(javax.servlet.http.HttpServletRequest request)

      Creates a GrailsParameterMap populating from the given request object

      Parameters:
        `request` - The request object

  - ### Method Detail

    - #### public void addParametersFrom(GrailsParameterMap otherMap)

    - #### @java.lang.Override public java.lang.Object clone()

    - #### @java.lang.Override public java.lang.Object get(java.lang.Object key)

    - #### @java.lang.Override public java.util.Date getDate(java.lang.String name)

      Obtains a date for the parameter name using the default format

      Parameters:
        `name` - The name of the parameter
      Returns:
        A date or null

    - #### public java.lang.Object getIdentifier()

      Returns:
        The identifier in the request

    - #### private java.lang.Object getParameterValue(java.util.Map requestMap, java.lang.String key)

    - #### public javax.servlet.http.HttpServletRequest getRequest()

      Returns:
        Returns the request.

    - #### private java.util.Date lazyEvaluateDateParam(java.lang.Object key)

    - #### private java.lang.String lookupFormat(java.lang.String name)

    - #### private void processNestedKeys(java.util.Map requestMap, java.lang.String key, java.lang.String nestedKey, java.util.Map nestedLevel)

    - #### @java.lang.Override public java.lang.Object put(java.lang.Object key, java.lang.Object value)

    - #### @java.lang.Override public void putAll(java.util.Map map)

    - #### @java.lang.Override public java.lang.Object remove(java.lang.Object key)

    - #### public java.lang.String toQueryString()

      Converts this parameter map into a query String. Note that this will flatten nested keys separating them with the . character and URL encode the result

      Returns:
        A query String starting with the ? character

    - #### protected void updateNestedKeys(java.util.Map keys)