Class WebScriptRequestImpl
- java.lang.Object
-
- org.springframework.extensions.webscripts.WebScriptRequestImpl
-
- All Implemented Interfaces:
WebScriptRequest
- Direct Known Subclasses:
WebScriptRequestURLImpl,WebScriptServletRequest
public abstract class WebScriptRequestImpl extends java.lang.Object implements WebScriptRequest
Basic Implementation of a Web Script Request- Author:
- davidc
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Logloggerstatic java.lang.StringMULTIPART_FORM_DATA"multipart/form-data" content type
-
Constructor Summary
Constructors Constructor Description WebScriptRequestImpl(Runtime runtime)Construction
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanforceSuccessStatus()Force response to return SUCCESS (200) code Note: This is to support clients who cannot support non-success codes e.g.java.lang.StringgetContentType()Gets the mimetype of the requestjava.lang.StringgetExtensionPath()Gets the path extension beyond the path registered for this service e.g.java.lang.StringgetFormat()Get Requested FormatDescription.FormatStylegetFormatStyle()Get the style the Format was specified injava.lang.StringgetJSONCallback()Get the JSON callback methodRuntimegetRuntime()Gets the initiating runtimebooleanisGuest()Determine if Guest User?java.lang.ObjectparseContent()Gets the request body as a parsed entity-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.extensions.webscripts.WebScriptRequest
getAgent, getContent, getContextPath, getHeader, getHeaderNames, getHeaderValues, getParameter, getParameterNames, getParameterValues, getPathInfo, getQueryString, getServerPath, getServiceContextPath, getServiceMatch, getServicePath, getURL
-
-
-
-
Field Detail
-
MULTIPART_FORM_DATA
public static final java.lang.String MULTIPART_FORM_DATA
"multipart/form-data" content type- See Also:
- Constant Field Values
-
logger
protected static final org.apache.commons.logging.Log logger
-
-
Constructor Detail
-
WebScriptRequestImpl
public WebScriptRequestImpl(Runtime runtime)
Construction- Parameters:
runtime- Runtime
-
-
Method Detail
-
getRuntime
public Runtime getRuntime()
Description copied from interface:WebScriptRequestGets the initiating runtime- Specified by:
getRuntimein interfaceWebScriptRequest- Returns:
- runtime that constructed this request
-
getExtensionPath
public java.lang.String getExtensionPath()
Description copied from interface:WebScriptRequestGets the path extension beyond the path registered for this service e.g. a) service registered path = /search/engine b) request path = /search/engine/external => /external- Specified by:
getExtensionPathin interfaceWebScriptRequest- Returns:
- extension path
-
isGuest
public boolean isGuest()
Description copied from interface:WebScriptRequestDetermine if Guest User?- Specified by:
isGuestin interfaceWebScriptRequest- Returns:
- true => guest user
-
getFormat
public java.lang.String getFormat()
Description copied from interface:WebScriptRequestGet Requested Format- Specified by:
getFormatin interfaceWebScriptRequest- Returns:
- content type requested
-
getFormatStyle
public Description.FormatStyle getFormatStyle()
Description copied from interface:WebScriptRequestGet the style the Format was specified in- Specified by:
getFormatStylein interfaceWebScriptRequest- Returns:
- format style (excludes any)
-
getJSONCallback
public java.lang.String getJSONCallback()
Description copied from interface:WebScriptRequestGet the JSON callback method- Specified by:
getJSONCallbackin interfaceWebScriptRequest- Returns:
- method (or null, if not specified)
-
forceSuccessStatus
public boolean forceSuccessStatus()
Description copied from interface:WebScriptRequestForce response to return SUCCESS (200) code Note: This is to support clients who cannot support non-success codes e.g. Flash player- Specified by:
forceSuccessStatusin interfaceWebScriptRequest- Returns:
- true => force return of 200, otherwise return status explicitly set
-
getContentType
public java.lang.String getContentType()
Description copied from interface:WebScriptRequestGets the mimetype of the request- Specified by:
getContentTypein interfaceWebScriptRequest- Returns:
- request content mimetype
-
parseContent
public java.lang.Object parseContent()
Description copied from interface:WebScriptRequestGets the request body as a parsed entity- Specified by:
parseContentin interfaceWebScriptRequest- Returns:
- the parsed entity (or null, if no content, or the content type cannot be parsed)
-
-