diff options
author | Alexander Kutsan <AKutsan@luxoft.com> | 2016-08-26 18:48:22 +0300 |
---|---|---|
committer | Alexander Kutsan <AKutsan@luxoft.com> | 2016-08-26 18:48:57 +0300 |
commit | d73e6dc8724c5799fae14efd4dcb214af74e4904 (patch) | |
tree | 9ebed8b422490c4d669e90e70783e4f5b55b65c9 /src/components/HMI/app/controller/sdl/RPCController.js | |
parent | c201c11a35d360c0b96f36b103a2590bfaeb6026 (diff) | |
parent | 61ef8c42badb879216f53d240e1101b9f83a9bb7 (diff) | |
download | sdl_core-d73e6dc8724c5799fae14efd4dcb214af74e4904.tar.gz |
Merge branch 'release/4.1.0'
Diffstat (limited to 'src/components/HMI/app/controller/sdl/RPCController.js')
-rw-r--r-- | src/components/HMI/app/controller/sdl/RPCController.js | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/components/HMI/app/controller/sdl/RPCController.js b/src/components/HMI/app/controller/sdl/RPCController.js index 27dd2ec087..44cbd6978e 100644 --- a/src/components/HMI/app/controller/sdl/RPCController.js +++ b/src/components/HMI/app/controller/sdl/RPCController.js @@ -114,6 +114,71 @@ SDL.RPCController = Em.Object }, /** + * Validate method for request DialNumber + * + * @param {Object} + * params + */ + DialNumber: function(params) { + + if (params == null) { + + this.resultStruct = { + "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"], + "resultMessage": "Parameter 'params' does not exists!" + }; + + return this.resultStruct; + } + + if (params.number == null) { + + this.resultStruct = { + "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"], + "resultMessage": "Parameter 'number' does not exists!" + }; + + return this.resultStruct; + } + + if (typeof params.number != 'string') { + + this.resultStruct = { + "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"], + "resultMessage": "Wrong type of parameter 'number'!" + }; + + return this.resultStruct; + } + + if (params.appID == null) { + + this.resultStruct = { + "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"], + "resultMessage": "Parameter 'appID' does not exists!" + }; + + return this.resultStruct; + } + + if (typeof params.appID != 'number') { + + this.resultStruct = { + "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"], + "resultMessage": "Wrong type of parameter 'appID'!" + }; + + return this.resultStruct; + } + + this.resultStruct = { + "resultCode": SDL.SDLModel.resultCode["SUCCESS"] + }; + + return this.resultStruct; + }, + + /** * Validate method for request UpdateDeviceList * * @param {Object} |