org.springframework.web.bind
Class BindUtils

java.lang.Object
  extended by org.springframework.web.bind.BindUtils

Deprecated. since Spring 1.2.7: prefer direct ServletRequestDataBinder usage, potentially in combination with a PropertyEditorRegistrar

public abstract class BindUtils
extends Object

Offers convenience methods for binding servlet request parameters to objects, including optional validation.

Since:
10.03.2003
Author:
Juergen Hoeller, Jean-Pierre Pawlak
See Also:
ServletRequestDataBinder, PropertyEditorRegistrar

Constructor Summary
BindUtils()
          Deprecated.  
 
Method Summary
static BindException bind(ServletRequest request, Object object, String objectName)
          Deprecated. Bind the parameters from the given request to the given object.
static BindException bind(ServletRequest request, Object object, String objectName, BindInitializer initializer)
          Deprecated. Bind the parameters from the given request to the given object, allowing for optional custom editors set in an bind initializer.
static BindException bindAndValidate(ServletRequest request, Object object, String objectName, Validator validator)
          Deprecated. Bind the parameters from the given request to the given object, invoking the given validator.
static BindException bindAndValidate(ServletRequest request, Object object, String objectName, Validator validator, BindInitializer initializer)
          Deprecated. Bind the parameters from the given request to the given object, invoking the given validator, and allowing for optional custom editors set in an bind initializer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindUtils

public BindUtils()
Deprecated. 
Method Detail

bind

public static BindException bind(ServletRequest request,
                                 Object object,
                                 String objectName)
Deprecated. 
Bind the parameters from the given request to the given object.

Parameters:
request - request containing the parameters
object - object to bind the parameters to
objectName - name of the bind object
Returns:
the binder used (can be treated as BindException or Errors instance)

bind

public static BindException bind(ServletRequest request,
                                 Object object,
                                 String objectName,
                                 BindInitializer initializer)
                          throws ServletException
Deprecated. 
Bind the parameters from the given request to the given object, allowing for optional custom editors set in an bind initializer.

Parameters:
request - request containing the parameters
object - object to bind the parameters to
objectName - name of the bind object
initializer - implementation of the BindInitializer interface which will be able to set custom editors
Returns:
the binder used (can be treated as BindException or Errors instance)
Throws:
ServletException - if thrown by the BindInitializer

bindAndValidate

public static BindException bindAndValidate(ServletRequest request,
                                            Object object,
                                            String objectName,
                                            Validator validator)
Deprecated. 
Bind the parameters from the given request to the given object, invoking the given validator.

Parameters:
request - request containing the parameters
object - object to bind the parameters to
objectName - name of the bind object
validator - validator to be invoked, or null if no validation
Returns:
the binder used (can be treated as Errors instance)

bindAndValidate

public static BindException bindAndValidate(ServletRequest request,
                                            Object object,
                                            String objectName,
                                            Validator validator,
                                            BindInitializer initializer)
                                     throws ServletException
Deprecated. 
Bind the parameters from the given request to the given object, invoking the given validator, and allowing for optional custom editors set in an bind initializer.

Parameters:
request - request containing the parameters
object - object to bind the parameters to
objectName - name of the bind object
validator - validator to be invoked, or null if no validation
initializer - implementation of the BindInitializer interface which will be able to set custom editors
Returns:
the binder used (can be treated as Errors instance)
Throws:
ServletException - if thrown by the BindInitializer


Copyright (c) 2002-2007 The Spring Framework Project.