GrailsParameterMap (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.web.servlet.mvc
[Java] Class GrailsParameterMap

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          org.codehaus.groovy.grails.web.util.AbstractTypeConvertingMap
              org.codehaus.groovy.grails.web.util.TypeConvertingMap
                  org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap

All Implemented Interfaces:
  java.lang.Cloneable

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

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
  Kate Rhodes
  Lari Hotari

Since:
  Oct 24, 2005

Field Summary
`static java.lang.Object[]` | `EMPTY_ARGS`
`static java.lang.String` | `REQUEST_BODY_PARSED`

Fields inherited from class AbstractTypeConvertingMap
wrappedMap

Constructor Summary
`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

Method Summary
`void` | `addParametersFrom(GrailsParameterMap otherMap)`
`java.lang.Object` | `clone()`
`java.lang.Object` | `get(java.lang.Object key)`
`java.util.Date` | `getDate(java.lang.String name)`
`java.lang.Object` | `getIdentifier()`
`javax.servlet.http.HttpServletRequest` | `getRequest()` @return Returns the request.
`java.lang.Object` | `put(java.lang.Object key, java.lang.Object value)`
`void` | `putAll(java.util.Map map)` Obtains a date for the parameter name using the default format
`java.lang.Object` | `remove(java.lang.Object key)`
`java.lang.String` | `toQueryString()` Converts this parameter map into a query String.

Methods inherited from class TypeConvertingMap
boolean, boolean, byte, byte, char, char, char, clone, double, double, float, float, int, int, long, long, short, short

Methods inherited from class AbstractTypeConvertingMap
asBoolean, clear, containsKey, containsValue, date, date, date, entrySet, equals, get, getBoolean, getBoolean, getByte, getByte, getChar, getChar, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getList, getLong, getLong, getShort, getShort, hashCode, isEmpty, keySet, list, put, putAll, remove, size, toString, values

Methods inherited from class groovy.lang.GroovyObjectSupport
groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()

Field Detail

### EMPTY_ARGS

    public static final java.lang.Object[] EMPTY_ARGS

### REQUEST_BODY_PARSED

    public static final java.lang.String REQUEST_BODY_PARSED

Constructor Detail

### GrailsParameterMap

    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

### GrailsParameterMap

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

  Creates a GrailsParameterMap populating from the given request object
  Parameters:
    `request` - The request object

Method Detail

### addParametersFrom

    public void addParametersFrom(GrailsParameterMap otherMap)

### clone

    @java.lang.Overridepublic Object clone() {
    public java.lang.Object clone()

### get

    @java.lang.Overrideif (valueArray.length == 1) {
    public java.lang.Object get(java.lang.Object key)

### getDate

    @java.lang.OverrideString format = CACHED_DATE_FORMATS.get(name);
    public java.util.Date getDate(java.lang.String name)

### getIdentifier

    public java.lang.Object getIdentifier()

### getRequest

    public javax.servlet.http.HttpServletRequest getRequest()

  Returns:
    Returns the request.

### put

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

### putAll

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

  Obtains a date for the parameter name using the default format
  Parameters:
    `name` - The name of the parameter
  Returns:
    A date or null

### remove

    @java.lang.Override/**
    public java.lang.Object remove(java.lang.Object key)

### toQueryString

    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

Groovy Documentation