com.arsdigita.bebop.parameters
Class TrimmedStringParameter

java.lang.Object
  extended bycom.arsdigita.bebop.parameters.ParameterModel
      extended bycom.arsdigita.bebop.parameters.StringParameter
          extended bycom.arsdigita.bebop.parameters.TrimmedStringParameter
All Implemented Interfaces:
Lockable

public class TrimmedStringParameter
extends StringParameter

A class that represents the model for String form parameters. This class extends StringParameter and differs by calling trim() on non-null values. This class is useful for fields you want to put in the DB without leading and trailng spaces

Version:
$Id: //core-platform/dev/src/com/arsdigita/bebop/parameters/TrimmedStringParameter.java#7 $
Author:
Karl Goldstein, Uday Mathur

Field Summary
static String versionId
           
 
Fields inherited from class com.arsdigita.bebop.parameters.ParameterModel
m_defaultValue, m_locked, m_name, m_parameterListeners
 
Constructor Summary
TrimmedStringParameter(String name)
           
 
Method Summary
 Object transformValue(javax.servlet.http.HttpServletRequest request)
          Retrieve the string from its request parameter.
 
Methods inherited from class com.arsdigita.bebop.parameters.StringParameter
getValueClass, unmarshal
 
Methods inherited from class com.arsdigita.bebop.parameters.ParameterModel
addParameterListener, createParameterData, createParameterData, createParameterData, getDefaultOverridesNull, getDefaultValue, getName, isLocked, isPassIn, lock, marshal, setDefaultOverridesNull, setDefaultValue, setName, setPassIn, transformSingleValue, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

TrimmedStringParameter

public TrimmedStringParameter(String name)
Method Detail

transformValue

public Object transformValue(javax.servlet.http.HttpServletRequest request)
                      throws IllegalArgumentException
Description copied from class: StringParameter
Retrieve the string from its request parameter. The returned object is of class String. If the request parameter is not present, null is returned.

Overrides:
transformValue in class StringParameter
Parameters:
request - represents the current request
Returns:
the String from the request parameter or null if the parameter does not occur in the request.
Throws:
IllegalArgumentException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC