Class WebScriptRequestImpl

java.lang.Object
org.springframework.extensions.webscripts.WebScriptRequestImpl
All Implemented Interfaces:
WebScriptRequest
Direct Known Subclasses:
WebScriptRequestURLImpl, WebScriptServletRequest

public abstract class WebScriptRequestImpl extends Object implements WebScriptRequest
Basic Implementation of a Web Script Request
Author:
davidc
  • Field Details

    • MULTIPART_FORM_DATA

      public static final String MULTIPART_FORM_DATA
      "multipart/form-data" content type
      See Also:
    • logger

      protected static final org.apache.commons.logging.Log logger
  • Constructor Details

    • WebScriptRequestImpl

      public WebScriptRequestImpl(Runtime runtime)
      Construction
      Parameters:
      runtime - Runtime
  • Method Details

    • getRuntime

      public Runtime getRuntime()
      Description copied from interface: WebScriptRequest
      Gets the initiating runtime
      Specified by:
      getRuntime in interface WebScriptRequest
      Returns:
      runtime that constructed this request
    • getExtensionPath

      public String getExtensionPath()
      Description copied from interface: WebScriptRequest
      Gets 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:
      getExtensionPath in interface WebScriptRequest
      Returns:
      extension path
    • isGuest

      public boolean isGuest()
      Description copied from interface: WebScriptRequest
      Determine if Guest User?
      Specified by:
      isGuest in interface WebScriptRequest
      Returns:
      true => guest user
    • getFormat

      public String getFormat()
      Description copied from interface: WebScriptRequest
      Get Requested Format
      Specified by:
      getFormat in interface WebScriptRequest
      Returns:
      content type requested
    • getFormatStyle

      public Description.FormatStyle getFormatStyle()
      Description copied from interface: WebScriptRequest
      Get the style the Format was specified in
      Specified by:
      getFormatStyle in interface WebScriptRequest
      Returns:
      format style (excludes any)
    • getJSONCallback

      public String getJSONCallback()
      Description copied from interface: WebScriptRequest
      Get the JSON callback method
      Specified by:
      getJSONCallback in interface WebScriptRequest
      Returns:
      method (or null, if not specified)
    • forceSuccessStatus

      public boolean forceSuccessStatus()
      Description copied from interface: WebScriptRequest
      Force response to return SUCCESS (200) code Note: This is to support clients who cannot support non-success codes e.g. Flash player
      Specified by:
      forceSuccessStatus in interface WebScriptRequest
      Returns:
      true => force return of 200, otherwise return status explicitly set
    • getContentType

      public String getContentType()
      Description copied from interface: WebScriptRequest
      Gets the mimetype of the request
      Specified by:
      getContentType in interface WebScriptRequest
      Returns:
      request content mimetype
    • parseContent

      public Object parseContent()
      Description copied from interface: WebScriptRequest
      Gets the request body as a parsed entity
      Specified by:
      parseContent in interface WebScriptRequest
      Returns:
      the parsed entity (or null, if no content, or the content type cannot be parsed)