function initState() {
        var result = $.Deferred();
        updateJsonHandler.parse()
            .done(function() {
                result.resolve();
            })
            .fail(function (code) {
                var logMsg;
                switch (code) {
                case StateHandlerMessages.FILE_NOT_FOUND:
                    logMsg = "AutoUpdate : updateHelper.json cannot be parsed, does not exist";
                    break;
                case StateHandlerMessages.FILE_NOT_READ:
                    logMsg = "AutoUpdate : updateHelper.json could not be read";
                    break;
                case StateHandlerMessages.FILE_PARSE_EXCEPTION:
                    logMsg = "AutoUpdate : updateHelper.json could not be parsed, exception encountered";
                    break;
                case StateHandlerMessages.FILE_READ_FAIL:
                    logMsg = "AutoUpdate : updateHelper.json could not be parsed";
                    break;
                }
                console.log(logMsg);
                result.reject();
            });
        return result.promise();
    }
function initState() {
        var result = $.Deferred();
        updateJsonHandler.parse()
            .done(function() {
                result.resolve();
            })
            .fail(function (code) {
                var logMsg;
                switch (code) {
                case StateHandlerMessages.FILE_NOT_FOUND:
                    logMsg = "AutoUpdate : updateHelper.json cannot be parsed, does not exist";
                    break;
                case StateHandlerMessages.FILE_NOT_READ:
                    logMsg = "AutoUpdate : updateHelper.json could not be read";
                    break;
                case StateHandlerMessages.FILE_PARSE_EXCEPTION:
                    logMsg = "AutoUpdate : updateHelper.json could not be parsed, exception encountered";
                    break;
                case StateHandlerMessages.FILE_READ_FAIL:
                    logMsg = "AutoUpdate : updateHelper.json could not be parsed";
                    break;
                }
                console.log(logMsg);
                result.reject();
            });
        return result.promise();
    }
function initState ( ) { var result = $ . Deferred ( ) ; updateJsonHandler . parse ( ) . done ( function ( ) { result . resolve ( ) ; } ) . fail ( function ( code ) { var logMsg ; switch ( code ) { case StateHandlerMessages . FILE_NOT_FOUND : logMsg = "AutoUpdate : updateHelper.json cannot be parsed, does not exist" ; break ; case StateHandlerMessages . FILE_NOT_READ : logMsg = "AutoUpdate : updateHelper.json could not be read" ; break ; case StateHandlerMessages . FILE_PARSE_EXCEPTION : logMsg = "AutoUpdate : updateHelper.json could not be parsed, exception encountered" ; break ; case StateHandlerMessages . FILE_READ_FAIL : logMsg = "AutoUpdate : updateHelper.json could not be parsed" ; break ; } console . log ( logMsg ) ; result . reject ( ) ; } ) ; return result . promise ( ) ; }
Initializes the state of parsed content from updateHelper.json
returns Promise Object Which is resolved when parsing is success
and rejected if parsing is failed.
Initializes the state of parsed content from updateHelper . json returns Promise Object Which is resolved when parsing is success and rejected if parsing is failed .
Initialize AutoUpdate state