Class WebScriptRequestURLImpl

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

public abstract class WebScriptRequestURLImpl extends WebScriptRequestImpl
Web Script Request implementation that acts upon a string representation of a URL
Author:
davidc
  • Field Details

    • contextPath

      protected String contextPath
      Script Url components
    • servletPath

      protected String servletPath
    • pathInfo

      protected String pathInfo
    • queryString

      protected String queryString
    • queryArgs

      protected Map<String,String> queryArgs
    • queryArgsMulti

      protected Map<String,List<String>> queryArgsMulti
    • serviceMatch

      protected Match serviceMatch
      Service bound to this request
  • Constructor Details

    • WebScriptRequestURLImpl

      public WebScriptRequestURLImpl(Runtime runtime, String scriptUrl, Match serviceMatch)
      Construct Note: It's assumed scriptUrl contains context path
      Parameters:
      runtime - Runtime
      scriptUrl - String
      serviceMatch - Match
    • WebScriptRequestURLImpl

      public WebScriptRequestURLImpl(Runtime runtime, String[] scriptUrlParts, Match serviceMatch)
      Construct
      Parameters:
      runtime - Runtime
      scriptUrlParts - String[]
      serviceMatch - Match
  • Method Details

    • splitURL

      public static String[] splitURL(String scriptUrl)
      Splits a Web Script Url into its component parts
      Parameters:
      scriptUrl - url e.g. /alfresco/service/mytasks?f=1
      Returns:
      url parts [0] = context (e.g. alfresco), [1] = servlet (e.g. service), [2] = script (e.g. mytasks), [3] = args (e.g. f=1)
    • splitURL

      public static String[] splitURL(String context, String scriptUrl)
      Splits a Web Script Url into its component parts
      Parameters:
      context - context path (can be empty string but never null)
      scriptUrl - url e.g. /alfresco/service/mytasks?f=1
      Returns:
      url parts [0] = context (e.g. alfresco, or empty if no context), [1] = servlet (e.g. service), [2] = script (e.g. mytasks), [3] = args (e.g. f=1)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getServiceMatch

      public Match getServiceMatch()
      Description copied from interface: WebScriptRequest
      Gets the matching API Service for this request
      Returns:
      the service match
    • getContextPath

      public String getContextPath()
      Description copied from interface: WebScriptRequest
      Gets the Alfresco Context Path
      Returns:
      context url e.g. /alfresco
    • getServiceContextPath

      public String getServiceContextPath()
      Description copied from interface: WebScriptRequest
      Gets the Alfresco Web Script Context Path
      Returns:
      service url e.g. /alfresco/service
    • getServicePath

      public String getServicePath()
      Description copied from interface: WebScriptRequest
      Gets the Alfresco Service Path
      Returns:
      service url e.g. /alfresco/service/search/keyword
    • getURL

      public String getURL()
      Description copied from interface: WebScriptRequest
      Gets the full request URL
      Returns:
      request url e.g. /alfresco/service/search/keyword?q=term
    • getPathInfo

      public String getPathInfo()
      Description copied from interface: WebScriptRequest
      Gets the service specific path
      Returns:
      request path e.g. /search/keyword
    • getQueryString

      public String getQueryString()
      Description copied from interface: WebScriptRequest
      Gets the query String
      Returns:
      query string e.g. q=alfresco&format=atom
    • getParameterNames

      public String[] getParameterNames()
      Description copied from interface: WebScriptRequest
      Gets the names of all parameters on the Url
      Returns:
      the names (empty, if none)
    • getParameter

      public String getParameter(String name)
      Description copied from interface: WebScriptRequest
      Gets the value of the named parameter
      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
      Parameters:
      name - parameter name
      Returns:
      array of values (or null, if parameter does not exist)