From c57c75945c94cf31c4a576e0bbdbb9607fc920af Mon Sep 17 00:00:00 2001 From: dilanua Date: Mon, 25 Jul 2016 10:11:39 +0530 Subject: [PATCH] Deprecating invoker-request-wrapper (unused) --- .../app/modules/invoker-request-wrapper.js | 150 +++++++++--------- 1 file changed, 77 insertions(+), 73 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/invoker-request-wrapper.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/invoker-request-wrapper.js index a8fe2b0fc1..b4ccc62dc1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/invoker-request-wrapper.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/invoker-request-wrapper.js @@ -16,79 +16,83 @@ * under the License. */ +/* + @Deprecated + */ + /** * This invokerRequestWrapper contains the wrappers for invoker util requests. */ -var invokerRequestWrapper = function () { - - var constants = require("/modules/constants.js"); - var serviceInvokers = require("/modules/backend-service-invoker.js").backendServiceInvoker; - - var publicWrappers = []; - - publicWrappers.initiate = function (method, url, payload) { - switch (method) { - case constants.HTTP_GET: - var response = serviceInvokers.XMLHttp.get(url, function (responsePayload) { - var response = {}; - response.content = responsePayload["responseContent"]; - response.status = "success"; - return response; - }, - function (responsePayload) { - var response = {}; - response.content = responsePayload; - response.status = "error"; - return response; - }); - return response; - break; - case constants.HTTP_POST: - var response = serviceInvokers.XMLHttp.post(url, payload, function (responsePayload) { - var response = {}; - response.content = responsePayload["responseContent"]; - response.status = "success"; - return response; - }, - function (responsePayload) { - var response = {}; - response.content = responsePayload; - response.status = "error"; - return response; - }); - return response; - break; - case constants.HTTP_PUT: - var response = serviceInvokers.XMLHttp.put(url, payload, function (responsePayload) { - var response = {}; - response.content = responsePayload["responseContent"]; - response.status = "success"; - return response; - }, - function (responsePayload) { - var response = {}; - response.content = responsePayload; - response.status = "error"; - return response; - }); - return response; - break; - case constants.HTTP_DELETE: - var response = serviceInvokers.XMLHttp.delete(url, function (responsePayload) { - var response = {}; - response.content = responsePayload["responseContent"]; - response.status = "success"; - return response; - }, - function (responsePayload) { - var response = {}; - response.content = responsePayload; - response.status = "error"; - return response; - }); - return response; - break; - } - } - -}(); +//var invokerRequestWrapper = function () { +// +// var constants = require("/modules/constants.js"); +// var serviceInvokers = require("/modules/backend-service-invoker.js").backendServiceInvoker; +// +// var publicWrappers = []; +// +// publicWrappers.initiate = function (method, url, payload) { +// switch (method) { +// case constants.HTTP_GET: +// var response = serviceInvokers.XMLHttp.get(url, function (responsePayload) { +// var response = {}; +// response.content = responsePayload["responseContent"]; +// response.status = "success"; +// return response; +// }, +// function (responsePayload) { +// var response = {}; +// response.content = responsePayload; +// response.status = "error"; +// return response; +// }); +// return response; +// break; +// case constants.HTTP_POST: +// var response = serviceInvokers.XMLHttp.post(url, payload, function (responsePayload) { +// var response = {}; +// response.content = responsePayload["responseContent"]; +// response.status = "success"; +// return response; +// }, +// function (responsePayload) { +// var response = {}; +// response.content = responsePayload; +// response.status = "error"; +// return response; +// }); +// return response; +// break; +// case constants.HTTP_PUT: +// var response = serviceInvokers.XMLHttp.put(url, payload, function (responsePayload) { +// var response = {}; +// response.content = responsePayload["responseContent"]; +// response.status = "success"; +// return response; +// }, +// function (responsePayload) { +// var response = {}; +// response.content = responsePayload; +// response.status = "error"; +// return response; +// }); +// return response; +// break; +// case constants.HTTP_DELETE: +// var response = serviceInvokers.XMLHttp.delete(url, function (responsePayload) { +// var response = {}; +// response.content = responsePayload["responseContent"]; +// response.status = "success"; +// return response; +// }, +// function (responsePayload) { +// var response = {}; +// response.content = responsePayload; +// response.status = "error"; +// return response; +// }); +// return response; +// break; +// } +// } +// +//}();