src/aria/modules/RequestMgr.js
function (requestObject, session) {
            var typeUtils = ariaUtilsType;
            var urlService = requestObject.urlService;
            if (!urlService) {
                // If no service is set , it takes from app environment
                urlService = this.__getUrlService();
            }
            this.$assert(434, urlService != null);

            // If not specified the session is the one stored on this
            if (!session) {
                session = this.session;
            }

            // Replace dots by forward slashes in the moduleName passed to actual URL creator
            var moduleName = requestObject.moduleName.replace(/\./g, '\/');

            var url;
            if (typeUtils.isString(requestObject.actionName)) { // We accept also empty strings.
                // If in 'action name' mode

                /* The actionName from the request object can contain url parameters, this has to handled separately and not
                 * by the request interface. */
                var actionSplit = this.__extractActionName(requestObject.actionName);

                // Let the implementation compute the URL
                url = urlService.createActionUrl(moduleName, actionSplit.name, session.id);

            } else if (requestObject.serviceSpec) {
                /* using the 'service specification' mode. No particular URL parameters handling
                 * here, all is under UrlService responsibility */
                url = urlService.createServiceUrl(moduleName, requestObject.serviceSpec, session.id);

            } else {
                // error : one of serviceSpec or actionName must be present
                this.$logError(this.MISSING_SERVICESPEC, [url]);
                return null;
            }

            if (!url || (typeUtils.isObject(url) && !url.url)) {
                this.$logError(this.INVALID_BASEURL, [url]);
                return null;
            }
            if (typeUtils.isString(url)) {
                // if raw string returned, convert it in structured request here
                url = {
                    url : url
                };
            }

            // if not specified, assume POST method (backward-compatibility)
            if (!url.method) {
                url.method = "POST";
            }

            if (requestObject.actionName) {
                // If in 'action name' mode, add the action parameters
                url.url = this.__appendActionParameters(url.url, actionSplit.params);
            }
            // Add the global parameters
            url.url = this.__appendGlobalParams(url.url, this._params);

            return url;
        }
function (requestObject, session) {
            var typeUtils = ariaUtilsType;
            var urlService = requestObject.urlService;
            if (!urlService) {
                // If no service is set , it takes from app environment
                urlService = this.__getUrlService();
            }
            this.$assert(434, urlService != null);

            // If not specified the session is the one stored on this
            if (!session) {
                session = this.session;
            }

            // Replace dots by forward slashes in the moduleName passed to actual URL creator
            var moduleName = requestObject.moduleName.replace(/\./g, '\/');

            var url;
            if (typeUtils.isString(requestObject.actionName)) { // We accept also empty strings.
                // If in 'action name' mode

                /* The actionName from the request object can contain url parameters, this has to handled separately and not
                 * by the request interface. */
                var actionSplit = this.__extractActionName(requestObject.actionName);

                // Let the implementation compute the URL
                url = urlService.createActionUrl(moduleName, actionSplit.name, session.id);

            } else if (requestObject.serviceSpec) {
                /* using the 'service specification' mode. No particular URL parameters handling
                 * here, all is under UrlService responsibility */
                url = urlService.createServiceUrl(moduleName, requestObject.serviceSpec, session.id);

            } else {
                // error : one of serviceSpec or actionName must be present
                this.$logError(this.MISSING_SERVICESPEC, [url]);
                return null;
            }

            if (!url || (typeUtils.isObject(url) && !url.url)) {
                this.$logError(this.INVALID_BASEURL, [url]);
                return null;
            }
            if (typeUtils.isString(url)) {
                // if raw string returned, convert it in structured request here
                url = {
                    url : url
                };
            }

            // if not specified, assume POST method (backward-compatibility)
            if (!url.method) {
                url.method = "POST";
            }

            if (requestObject.actionName) {
                // If in 'action name' mode, add the action parameters
                url.url = this.__appendActionParameters(url.url, actionSplit.params);
            }
            // Add the global parameters
            url.url = this.__appendGlobalParams(url.url, this._params);

            return url;
        }
function ( requestObject , session ) { var typeUtils = ariaUtilsType ; var urlService = requestObject . urlService ; if ( ! urlService ) { // If no service is set , it takes from app environment urlService = this . __getUrlService ( ) ; } this . $assert ( 434 , urlService != null ) ; // If not specified the session is the one stored on this if ( ! session ) { session = this . session ; } // Replace dots by forward slashes in the moduleName passed to actual URL creator var moduleName = requestObject . moduleName . replace ( / \. / g , '\/' ) ; var url ; if ( typeUtils . isString ( requestObject . actionName ) ) { // We accept also empty strings. // If in 'action name' mode /* The actionName from the request object can contain url parameters, this has to handled separately and not
                 * by the request interface. */ var actionSplit = this . __extractActionName ( requestObject . actionName ) ; // Let the implementation compute the URL url = urlService . createActionUrl ( moduleName , actionSplit . name , session . id ) ; } else if ( requestObject . serviceSpec ) { /* using the 'service specification' mode. No particular URL parameters handling
                 * here, all is under UrlService responsibility */ url = urlService . createServiceUrl ( moduleName , requestObject . serviceSpec , session . id ) ; } else { // error : one of serviceSpec or actionName must be present this . $logError ( this . MISSING_SERVICESPEC , [ url ] ) ; return null ; } if ( ! url || ( typeUtils . isObject ( url ) && ! url . url ) ) { this . $logError ( this . INVALID_BASEURL , [ url ] ) ; return null ; } if ( typeUtils . isString ( url ) ) { // if raw string returned, convert it in structured request here url = { url : url } ; } // if not specified, assume POST method (backward-compatibility) if ( ! url . method ) { url . method = "POST" ; } if ( requestObject . actionName ) { // If in 'action name' mode, add the action parameters url . url = this . __appendActionParameters ( url . url , actionSplit . params ) ; } // Add the global parameters url . url = this . __appendGlobalParams ( url . url , this . _params ) ; return url ; }
Internal function used to build the request URL
@param {Object} requestObject the request object - see. RequestObject bean
@param {Object} session session corresponding to the request (paramName and id)
@return {String} the url
Internal function used to build the request URL