org.codehaus.plexus.summit.parameters
Class SummitRequestParameterParser

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.plexus.summit.parameters.BaseRequestParameterParser
          extended byorg.codehaus.plexus.summit.parameters.SummitRequestParameterParser
All Implemented Interfaces:
org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.logging.LogEnabled, RequestParameterParser

public class SummitRequestParameterParser
extends BaseRequestParameterParser

Summit implementation of a RequestParameterParser. This implementation uses the "Turbine"-style of parsing query info and path info to assemble a parameter map. The path info associated with this request is assumed to be in the format of:

     /param1/value1/param2/value2/param3/value3
 

This component is thread-safe.

Version:
$Revision: 2083 $
Author:
Ilkka Priha, Jon S. Stevens, Sean Legassick, Pete Kazmier

Field Summary
 
Fields inherited from class org.codehaus.plexus.summit.parameters.BaseRequestParameterParser
 
Fields inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
 
Fields inherited from interface org.codehaus.plexus.summit.parameters.RequestParameterParser
ROLE
 
Constructor Summary
SummitRequestParameterParser()
           
 
Method Summary
protected  void doParse(javax.servlet.http.HttpServletRequest request, java.util.Map parameterMap)
          Parses the query info and path info for the parameters associated with this request.
private  void processPathInfo(javax.servlet.http.HttpServletRequest request, java.util.Map parameterMap)
          Process the specified HTTP request for name/value pairs encoded within the path info which are separated by a '/' character.
 
Methods inherited from class org.codehaus.plexus.summit.parameters.BaseRequestParameterParser
addFileItem, addParameter, initialize, parse
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SummitRequestParameterParser

public SummitRequestParameterParser()
Method Detail

doParse

protected void doParse(javax.servlet.http.HttpServletRequest request,
                       java.util.Map parameterMap)
Parses the query info and path info for the parameters associated with this request. Please note that the parser assumes the path info to be in the format described in the class documentation. If you prefer to use the standard servlet method of parsing parameters, see the BaseRequestParameterParser.

Overrides:
doParse in class BaseRequestParameterParser
Parameters:
request - The HTTP request to parse for parameters. a RequestParameters object for easy access to the parameters.
parameterMap - A map of the collected parameters which should be used to store additional parameters in the format described above. A helper method has been provided to ensure the values are stored as arrays (see addParameter).
See Also:
RequestParameterParser.parse(javax.servlet.http.HttpServletRequest)

processPathInfo

private void processPathInfo(javax.servlet.http.HttpServletRequest request,
                             java.util.Map parameterMap)
Process the specified HTTP request for name/value pairs encoded within the path info which are separated by a '/' character. Each parsed pair is stored in the supplied parameter map.

Parameters:
request - The HTTP request to be parsed.
parameterMap - The parameter map which is populated with the parsed name/value pairs.