org.springframework.extensions.webscripts.form
Class UrlEncodedFormReader

java.lang.Object
  extended by org.springframework.extensions.webscripts.form.UrlEncodedFormReader
All Implemented Interfaces:
FormatReader<Object>

public class UrlEncodedFormReader
extends Object
implements FormatReader<Object>

Convert application/x-www-form-urlencoded content to a Map where the keys are parameter names and the values are their associated unencoded values.

Author:
Neil McErlean

Constructor Summary
UrlEncodedFormReader()
           
 
Method Summary
 Map<String,Object> createScriptParameters(WebScriptRequest req, WebScriptResponse res)
          Create script parameters specific to source mimetype
 Class<? extends Object> getDestinationClass()
          Gets the Java Class to convert to
 String getSourceMimetype()
          Gets the source mimetype to convert from
 Object read(WebScriptRequest req)
          Converts mimetype to Java Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlEncodedFormReader

public UrlEncodedFormReader()
Method Detail

getDestinationClass

public Class<? extends Object> getDestinationClass()
Description copied from interface: FormatReader
Gets the Java Class to convert to

Specified by:
getDestinationClass in interface FormatReader<Object>
Returns:
Java Clas
See Also:
FormatReader.getDestinationClass()

getSourceMimetype

public String getSourceMimetype()
Description copied from interface: FormatReader
Gets the source mimetype to convert from

Specified by:
getSourceMimetype in interface FormatReader<Object>
Returns:
mimetype
See Also:
FormatReader.getSourceMimetype()

read

public Object read(WebScriptRequest req)
Description copied from interface: FormatReader
Converts mimetype to Java Object

Specified by:
read in interface FormatReader<Object>
Parameters:
req - web script request
Returns:
Java Object
See Also:
FormatReader.read(org.springframework.extensions.webscripts.WebScriptRequest)

createScriptParameters

public Map<String,Object> createScriptParameters(WebScriptRequest req,
                                                 WebScriptResponse res)
Description copied from interface: FormatReader
Create script parameters specific to source mimetype

Specified by:
createScriptParameters in interface FormatReader<Object>
Parameters:
req - web script request
res - web script response
Returns:
map of script objects indexed by name
See Also:
FormatReader.createScriptParameters(org.springframework.extensions.webscripts.WebScriptRequest, org.springframework.extensions.webscripts.WebScriptResponse)


Copyright © 2009 SpringSource, Inc. All Rights Reserved.