org.springframework.web.bind
Class ServletRequestParameterPropertyValues

java.lang.Object
  extended byorg.springframework.beans.MutablePropertyValues
      extended byorg.springframework.web.bind.ServletRequestParameterPropertyValues
All Implemented Interfaces:
PropertyValues

public class ServletRequestParameterPropertyValues
extends MutablePropertyValues

PropertyValues implementation created from parameters in a ServletRequest. Looks for all property values beginning with a certain prefix and prefix separator.

This class is not immutable to be able to efficiently remove property values that should be ignored for binding.

Version:
$Id: ServletRequestParameterPropertyValues.java,v 1.4 2004/03/18 02:46:15 trisberg Exp $
Author:
Rod Johnson, Juergen Hoeller

Field Summary
static java.lang.String DEFAULT_PREFIX_SEPARATOR
          Default prefix separator
 
Constructor Summary
ServletRequestParameterPropertyValues(javax.servlet.ServletRequest request)
          Create new ServletRequestPropertyValues using no prefix (and hence, no prefix separator).
ServletRequestParameterPropertyValues(javax.servlet.ServletRequest request, java.lang.String prefix)
          Create new ServletRequestPropertyValues using the default prefix separator and the given prefix (the underscore character "_").
ServletRequestParameterPropertyValues(javax.servlet.ServletRequest request, java.lang.String prefix, java.lang.String prefixSeparator)
          Create new ServletRequestPropertyValues supplying both prefix and prefix separator.
 
Methods inherited from class org.springframework.beans.MutablePropertyValues
addPropertyValue, addPropertyValue, changesSince, contains, getPropertyValue, getPropertyValues, removePropertyValue, removePropertyValue, setPropertyValueAt, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PREFIX_SEPARATOR

public static final java.lang.String DEFAULT_PREFIX_SEPARATOR
Default prefix separator

See Also:
Constant Field Values
Constructor Detail

ServletRequestParameterPropertyValues

public ServletRequestParameterPropertyValues(javax.servlet.ServletRequest request)
Create new ServletRequestPropertyValues using no prefix (and hence, no prefix separator).

Parameters:
request - HTTP Request

ServletRequestParameterPropertyValues

public ServletRequestParameterPropertyValues(javax.servlet.ServletRequest request,
                                             java.lang.String prefix)
Create new ServletRequestPropertyValues using the default prefix separator and the given prefix (the underscore character "_").

Parameters:
request - HTTP Request
prefix - prefix for properties

ServletRequestParameterPropertyValues

public ServletRequestParameterPropertyValues(javax.servlet.ServletRequest request,
                                             java.lang.String prefix,
                                             java.lang.String prefixSeparator)
Create new ServletRequestPropertyValues supplying both prefix and prefix separator.

Parameters:
request - HTTP Request
prefix - prefix for properties
prefixSeparator - Separator delimiting prefix (e.g. user) from property name (e.g. age) to build a request parameter name such as user_age


Copyright (C) 2003-2004 The Spring Framework Project.