org.springframework.extensions.webscripts
Class LocalWebScriptRequest

java.lang.Object
  extended by org.springframework.extensions.webscripts.WebScriptRequestImpl
      extended by org.springframework.extensions.webscripts.WebScriptRequestURLImpl
          extended by org.springframework.extensions.webscripts.LocalWebScriptRequest
All Implemented Interfaces:
WebScriptRequest

public class LocalWebScriptRequest
extends WebScriptRequestURLImpl

The Class LocalWebScriptRequest.

Author:
muzquiano

Field Summary
 
Fields inherited from class org.springframework.extensions.webscripts.WebScriptRequestURLImpl
contextPath, pathInfo, queryArgs, queryArgsMulti, queryString, serviceMatch, servletPath
 
Fields inherited from class org.springframework.extensions.webscripts.WebScriptRequestImpl
logger
 
Constructor Summary
LocalWebScriptRequest(Runtime runtime, String scriptUrl, Match match, Map<String,String> parameters, ServerProperties serverProps, javax.servlet.http.HttpServletRequest request, LocalWebScriptContext context)
          Instantiates a new local web script request.
 
Method Summary
 String getAgent()
          Get User Agent TODO: Expand on known agents
 Content getContent()
          Gets the request body as content
 String getHeader(String name)
          Gets the value of the named header
 String[] getHeaderNames()
          Gets the names of all headers for this request
 String[] getHeaderValues(String name)
          Gets the (array) value of the named header Note: An array of one item is returned when a "single value" named header is requested
 javax.servlet.http.HttpServletRequest getHttpServletRequest()
          Gets the http servlet request.
 String getParameter(String name)
          Gets the value of the named parameter
 String[] getParameterNames()
          Gets the names of all parameters on the Url
 String[] getParameterValues(String name)
          Gets the (array) value of the named parameter Note: An array of one item is returned when a "single value" named parameter is requested
 String getServerPath()
          Get server portion of the request e.g.
 
Methods inherited from class org.springframework.extensions.webscripts.WebScriptRequestURLImpl
getContextPath, getPathInfo, getQueryString, getServiceContextPath, getServiceMatch, getServicePath, getURL, splitURL, splitURL, toString
 
Methods inherited from class org.springframework.extensions.webscripts.WebScriptRequestImpl
forceSuccessStatus, getContentType, getExtensionPath, getFormat, getFormatStyle, getJSONCallback, getRuntime, isGuest, parseContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalWebScriptRequest

public LocalWebScriptRequest(Runtime runtime,
                             String scriptUrl,
                             Match match,
                             Map<String,String> parameters,
                             ServerProperties serverProps,
                             javax.servlet.http.HttpServletRequest request,
                             LocalWebScriptContext context)
Instantiates a new local web script request.

Parameters:
runtime - the runtime
scriptUrl - the script url
match - the match
parameters - the parameters
request - the request
Method Detail

getHttpServletRequest

public javax.servlet.http.HttpServletRequest getHttpServletRequest()
Gets the http servlet request.

Returns:
the http servlet request

getParameterNames

public String[] getParameterNames()
Description copied from interface: WebScriptRequest
Gets the names of all parameters on the Url

Specified by:
getParameterNames in interface WebScriptRequest
Overrides:
getParameterNames in class WebScriptRequestURLImpl
Returns:
the names (empty, if none)

getParameter

public String getParameter(String name)
Description copied from interface: WebScriptRequest
Gets the value of the named parameter

Specified by:
getParameter in interface WebScriptRequest
Overrides:
getParameter in class WebScriptRequestURLImpl
Parameters:
name - parameter name
Returns:
parameter value (or null, if parameter does not exist)

getParameterValues

public String[] getParameterValues(String name)
Description copied from interface: WebScriptRequest
Gets the (array) value of the named parameter Note: An array of one item is returned when a "single value" named parameter is requested

Specified by:
getParameterValues in interface WebScriptRequest
Overrides:
getParameterValues in class WebScriptRequestURLImpl
Parameters:
name - parameter name
Returns:
array of values (or null, if parameter does not exist)

getAgent

public String getAgent()
Description copied from interface: WebScriptRequest
Get User Agent TODO: Expand on known agents

Returns:
MSIE / Firefox

getServerPath

public String getServerPath()
Description copied from interface: WebScriptRequest
Get server portion of the request e.g. scheme://host:port

Returns:
server path

getHeaderNames

public String[] getHeaderNames()
Description copied from interface: WebScriptRequest
Gets the names of all headers for this request

Returns:
the names (empty, if none)

getHeader

public String getHeader(String name)
Description copied from interface: WebScriptRequest
Gets the value of the named header

Parameters:
name - header name
Returns:
header value (or null, if header does not exist)

getHeaderValues

public String[] getHeaderValues(String name)
Description copied from interface: WebScriptRequest
Gets the (array) value of the named header Note: An array of one item is returned when a "single value" named header is requested

Parameters:
name - header name
Returns:
array of values (or null, if header does not exist)

getContent

public Content getContent()
Description copied from interface: WebScriptRequest
Gets the request body as content

Returns:
request content (or null, if none)


Copyright © 2009 SpringSource, Inc. All Rights Reserved.