Class WebScriptRequestURLImpl
java.lang.Object
org.springframework.extensions.webscripts.WebScriptRequestImpl
org.springframework.extensions.webscripts.WebScriptRequestURLImpl
- All Implemented Interfaces:
WebScriptRequest
Web Script Request implementation that acts upon a string representation
of a URL
- Author:
- davidc
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringScript Url componentsprotected Stringprotected Stringprotected MatchService bound to this requestprotected StringFields inherited from class org.springframework.extensions.webscripts.WebScriptRequestImpl
logger, MULTIPART_FORM_DATA -
Constructor Summary
ConstructorsConstructorDescriptionWebScriptRequestURLImpl(Runtime runtime, String[] scriptUrlParts, Match serviceMatch) ConstructWebScriptRequestURLImpl(Runtime runtime, String scriptUrl, Match serviceMatch) Construct Note: It's assumed scriptUrl contains context path -
Method Summary
Modifier and TypeMethodDescriptionGets the Alfresco Context PathgetParameter(String name) Gets the value of the named parameterString[]Gets the names of all parameters on the UrlString[]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 requestedGets the service specific pathGets the query StringGets the Alfresco Web Script Context PathGets the matching API Service for this requestGets the Alfresco Service PathgetURL()Gets the full request URLstatic String[]Splits a Web Script Url into its component partsstatic String[]Splits a Web Script Url into its component partstoString()Methods inherited from class org.springframework.extensions.webscripts.WebScriptRequestImpl
forceSuccessStatus, getContentType, getExtensionPath, getFormat, getFormatStyle, getJSONCallback, getRuntime, isGuest, parseContentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.extensions.webscripts.WebScriptRequest
getAgent, getContent, getHeader, getHeaderNames, getHeaderValues, getServerPath
-
Field Details
-
contextPath
Script Url components -
servletPath
-
pathInfo
-
queryString
-
queryArgs
-
queryArgsMulti
-
serviceMatch
Service bound to this request
-
-
Constructor Details
-
WebScriptRequestURLImpl
Construct Note: It's assumed scriptUrl contains context path- Parameters:
runtime- RuntimescriptUrl- StringserviceMatch- Match
-
WebScriptRequestURLImpl
Construct- Parameters:
runtime- RuntimescriptUrlParts- String[]serviceMatch- Match
-
-
Method Details
-
splitURL
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
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
-
getServiceMatch
Description copied from interface:WebScriptRequestGets the matching API Service for this request- Returns:
- the service match
-
getContextPath
Description copied from interface:WebScriptRequestGets the Alfresco Context Path- Returns:
- context url e.g. /alfresco
-
getServiceContextPath
Description copied from interface:WebScriptRequestGets the Alfresco Web Script Context Path- Returns:
- service url e.g. /alfresco/service
-
getServicePath
Description copied from interface:WebScriptRequestGets the Alfresco Service Path- Returns:
- service url e.g. /alfresco/service/search/keyword
-
getURL
Description copied from interface:WebScriptRequestGets the full request URL- Returns:
- request url e.g. /alfresco/service/search/keyword?q=term
-
getPathInfo
Description copied from interface:WebScriptRequestGets the service specific path- Returns:
- request path e.g. /search/keyword
-
getQueryString
Description copied from interface:WebScriptRequestGets the query String- Returns:
- query string e.g. q=alfresco&format=atom
-
getParameterNames
Description copied from interface:WebScriptRequestGets the names of all parameters on the Url- Returns:
- the names (empty, if none)
-
getParameter
Description copied from interface:WebScriptRequestGets the value of the named parameter- Parameters:
name- parameter name- Returns:
- parameter value (or null, if parameter does not exist)
-
getParameterValues
Description copied from interface:WebScriptRequestGets 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)
-