Spring Web Flow

org.springframework.webflow.test
Class MockParameterMap

java.lang.Object
  extended by org.springframework.webflow.core.collection.LocalParameterMap
      extended by org.springframework.webflow.test.MockParameterMap
All Implemented Interfaces:
java.io.Serializable, MapAdaptable<java.lang.String,java.lang.Object>, ParameterMap

public class MockParameterMap
extends LocalParameterMap

A extension of parameter map that allows for mutation of parameters. Useful as a stub for testing.

Author:
Keith Donald
See Also:
ParameterMap, Serialized Form

Constructor Summary
MockParameterMap()
          Creates a new parameter map, initially empty.
 
Method Summary
 MockParameterMap put(java.lang.String parameterName, org.springframework.web.multipart.MultipartFile parameterValues)
          Add a new multi-part file parameter to this map.
 MockParameterMap put(java.lang.String parameterName, java.lang.String parameterValue)
          Add a new parameter to this map.
 MockParameterMap put(java.lang.String parameterName, java.lang.String[] parameterValues)
          Add a new multi-valued parameter to this map.
 
Methods inherited from class org.springframework.webflow.core.collection.LocalParameterMap
asAttributeMap, asMap, contains, equals, get, get, get, get, getArray, getArray, getBoolean, getBoolean, getInteger, getInteger, getLong, getLong, getMapInternal, getMultipartFile, getNumber, getNumber, getRequired, getRequired, getRequiredArray, getRequiredArray, getRequiredBoolean, getRequiredInteger, getRequiredLong, getRequiredMultipartFile, getRequiredNumber, hashCode, initParameters, isEmpty, size, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockParameterMap

public MockParameterMap()
Creates a new parameter map, initially empty.

Method Detail

put

public MockParameterMap put(java.lang.String parameterName,
                            java.lang.String parameterValue)
Add a new parameter to this map.

Parameters:
parameterName - the parameter name
parameterValue - the parameter value
Returns:
this, to support call chaining

put

public MockParameterMap put(java.lang.String parameterName,
                            java.lang.String[] parameterValues)
Add a new multi-valued parameter to this map.

Parameters:
parameterName - the parameter name
parameterValues - the parameter values
Returns:
this, to support call chaining

put

public MockParameterMap put(java.lang.String parameterName,
                            org.springframework.web.multipart.MultipartFile parameterValues)
Add a new multi-part file parameter to this map.

Parameters:
parameterName - the parameter name
parameterValues - the parameter values
Returns:
this, to support call chaining

Spring Web Flow