Interface WebScriptRequest
-
- All Known Subinterfaces:
WrappingWebScriptRequest
- All Known Implementing Classes:
WebScriptJSFRequest,WebScriptPortletRequest,WebScriptRequestImpl,WebScriptRequestURLImpl,WebScriptServletRequest
public interface WebScriptRequestWeb Script Request- Author:
- davidc
-
-
Method Summary
All Methods Instance Methods Abstract 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.StringgetAgent()Get User Agent TODO: Expand on known agentsorg.springframework.extensions.surf.util.ContentgetContent()Gets the request body as contentjava.lang.StringgetContentType()Gets the mimetype of the requestjava.lang.StringgetContextPath()Gets the Alfresco Context Pathjava.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.StringgetHeader(java.lang.String name)Gets the value of the named headerjava.lang.String[]getHeaderNames()Gets the names of all headers for this requestjava.lang.String[]getHeaderValues(java.lang.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 requestedjava.lang.StringgetJSONCallback()Get the JSON callback methodjava.lang.StringgetParameter(java.lang.String name)Gets the value of the named parameterjava.lang.String[]getParameterNames()Gets the names of all parameters on the Urljava.lang.String[]getParameterValues(java.lang.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 requestedjava.lang.StringgetPathInfo()Gets the service specific pathjava.lang.StringgetQueryString()Gets the query StringRuntimegetRuntime()Gets the initiating runtimejava.lang.StringgetServerPath()Get server portion of the request e.g.java.lang.StringgetServiceContextPath()Gets the Alfresco Web Script Context PathMatchgetServiceMatch()Gets the matching API Service for this requestjava.lang.StringgetServicePath()Gets the Alfresco Service Pathjava.lang.StringgetURL()Gets the full request URLbooleanisGuest()Determine if Guest User?java.lang.ObjectparseContent()Gets the request body as a parsed entity
-
-
-
Method Detail
-
getServiceMatch
Match getServiceMatch()
Gets the matching API Service for this request- Returns:
- the service match
-
getServerPath
java.lang.String getServerPath()
Get server portion of the request e.g. scheme://host:port- Returns:
- server path
-
getContextPath
java.lang.String getContextPath()
Gets the Alfresco Context Path- Returns:
- context url e.g. /alfresco
-
getServiceContextPath
java.lang.String getServiceContextPath()
Gets the Alfresco Web Script Context Path- Returns:
- service url e.g. /alfresco/service
-
getServicePath
java.lang.String getServicePath()
Gets the Alfresco Service Path- Returns:
- service url e.g. /alfresco/service/search/keyword
-
getURL
java.lang.String getURL()
Gets the full request URL- Returns:
- request url e.g. /alfresco/service/search/keyword?q=term
-
getPathInfo
java.lang.String getPathInfo()
Gets the service specific path- Returns:
- request path e.g. /search/keyword
-
getQueryString
java.lang.String getQueryString()
Gets the query String- Returns:
- query string e.g. q=alfresco&format=atom
-
getParameterNames
java.lang.String[] getParameterNames()
Gets the names of all parameters on the Url- Returns:
- the names (empty, if none)
-
getParameter
java.lang.String getParameter(java.lang.String name)
Gets the value of the named parameter- Parameters:
name- parameter name- Returns:
- parameter value (or null, if parameter does not exist)
-
getParameterValues
java.lang.String[] getParameterValues(java.lang.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- Parameters:
name- parameter name- Returns:
- array of values (or null, if parameter does not exist)
-
getHeaderNames
java.lang.String[] getHeaderNames()
Gets the names of all headers for this request- Returns:
- the names (empty, if none)
-
getHeader
java.lang.String getHeader(java.lang.String name)
Gets the value of the named header- Parameters:
name- header name- Returns:
- header value (or null, if header does not exist)
-
getHeaderValues
java.lang.String[] getHeaderValues(java.lang.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- Parameters:
name- header name- Returns:
- array of values (or null, if header does not exist)
-
getExtensionPath
java.lang.String getExtensionPath()
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- Returns:
- extension path
-
getContentType
java.lang.String getContentType()
Gets the mimetype of the request- Returns:
- request content mimetype
-
getContent
org.springframework.extensions.surf.util.Content getContent()
Gets the request body as content- Returns:
- request content (or null, if none)
-
parseContent
java.lang.Object parseContent()
Gets the request body as a parsed entity- Returns:
- the parsed entity (or null, if no content, or the content type cannot be parsed)
-
isGuest
boolean isGuest()
Determine if Guest User?- Returns:
- true => guest user
-
getFormat
java.lang.String getFormat()
Get Requested Format- Returns:
- content type requested
-
getFormatStyle
Description.FormatStyle getFormatStyle()
Get the style the Format was specified in- Returns:
- format style (excludes any)
-
getAgent
java.lang.String getAgent()
Get User Agent TODO: Expand on known agents- Returns:
- MSIE / Firefox
-
getJSONCallback
java.lang.String getJSONCallback()
Get the JSON callback method- Returns:
- method (or null, if not specified)
-
forceSuccessStatus
boolean forceSuccessStatus()
Force response to return SUCCESS (200) code Note: This is to support clients who cannot support non-success codes e.g. Flash player- Returns:
- true => force return of 200, otherwise return status explicitly set
-
getRuntime
Runtime getRuntime()
Gets the initiating runtime- Returns:
- runtime that constructed this request
-
-