diff options
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} |