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
[Groovy] Class GrailsParameterMap

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

    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

Since:
  Oct 24, 2005

Field Summary

Fields inherited from class TypeConvertingMap
wrappedMap

Constructor Summary
`GrailsParameterMap(java.util.Map values, HttpServletRequest request)` Does not populate the GrailsParameterMap from the request but instead uses the supplied values.
`GrailsParameterMap(HttpServletRequest request)` Creates a GrailsParameterMap populating from the given request object

Method Summary
`void` | `clear()`
`java.lang.Object` | `clone()`
`boolean` | `containsKey(java.lang.Object key)`
`boolean` | `containsValue(java.lang.Object value)`
`java.util.Set` | `entrySet()`
`java.lang.Object` | `get(java.lang.Object key)`
`HttpServletRequest` | `getRequest()` @return Returns the request.
`boolean` | `isEmpty()`
`java.util.Set` | `keySet()`
`java.util.List` | `list(java.lang.String name)` Obtains a list of values from parameter.
`java.lang.Object` | `put(java.lang.Object key, java.lang.Object value)`
`void` | `putAll(java.util.Map map)`
`java.lang.Object` | `remove(java.lang.Object key)`
`int` | `size()`
`java.lang.String` | `toQueryString()` Converts this parameter map into a query String.
`java.lang.String` | `toString()`
`java.util.Collection` | `values()`

Methods inherited from class TypeConvertingMap
clear, containsKey, containsValue, entrySet, equals, get, getBoolean, getByte, getDouble, getFloat, getInt, getList, getLong, getShort, hashCode, isEmpty, keySet, put, putAll, remove, size, values

Constructor Detail

### GrailsParameterMap

    GrailsParameterMap(java.util.Map values, 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

    GrailsParameterMap(HttpServletRequest request)

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

Method Detail

### clear

    void clear()

### clone

    java.lang.Object clone()

### containsKey

    boolean containsKey(java.lang.Object key)

### containsValue

    boolean containsValue(java.lang.Object value)

### entrySet

    java.util.Set entrySet()

### get

    java.lang.Object get(java.lang.Object key)

### getRequest

    HttpServletRequest getRequest()

  Returns:
    Returns the request.

### isEmpty

    boolean isEmpty()

### keySet

    java.util.Set keySet()

### list

    java.util.List list(java.lang.String name)

  Obtains a list of values from parameter.
  Parameters:
    `name` - The name of the parameter
  Returns:
    A list of values

### put

    java.lang.Object put(java.lang.Object key, java.lang.Object value)

### putAll

    void putAll(java.util.Map map)

### remove

    java.lang.Object remove(java.lang.Object key)

### size

    int size()

### toQueryString

    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

### toString

    java.lang.String toString()

### values

    java.util.Collection values()

Groovy Documentation