Class WebScriptRequestURLImpl

    • Field Detail

      • contextPath

        protected java.lang.String contextPath
        Script Url components
      • servletPath

        protected java.lang.String servletPath
      • pathInfo

        protected java.lang.String pathInfo
      • queryString

        protected java.lang.String queryString
      • queryArgs

        protected java.util.Map<java.lang.String,​java.lang.String> queryArgs
      • queryArgsMulti

        protected java.util.Map<java.lang.String,​java.util.List<java.lang.String>> queryArgsMulti
      • serviceMatch

        protected Match serviceMatch
        Service bound to this request
    • Constructor Detail

      • WebScriptRequestURLImpl

        public WebScriptRequestURLImpl​(Runtime runtime,
                                       java.lang.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,
                                       java.lang.String[] scriptUrlParts,
                                       Match serviceMatch)
        Construct
        Parameters:
        runtime - Runtime
        scriptUrlParts - String[]
        serviceMatch - Match
    • Method Detail

      • splitURL

        public static java.lang.String[] splitURL​(java.lang.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 java.lang.String[] splitURL​(java.lang.String context,
                                                  java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getServiceMatch

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

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

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

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

        public java.lang.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 java.lang.String getPathInfo()
        Description copied from interface: WebScriptRequest
        Gets the service specific path
        Returns:
        request path e.g. /search/keyword
      • getQueryString

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

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

        public java.lang.String getParameter​(java.lang.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 java.lang.String[] getParameterValues​(java.lang.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)