src/aria/core/AppEnvironment.js
function (cfg, callback, update) {
            update = !!update;
            var keys = ariaUtilsObject.keys(cfg);
            if (update) {
                ariaUtilsJson.inject(cfg, this.applicationSettings, true);
            } else {
                if (keys.length === 0) {
                    // reset stored application settings
                    this.applicationSettings = {};
                    keys = null;
                } else {
                    for (var i = 0; i < keys.length; i++) {
                        var keyName = keys[i];
                        this.applicationSettings[keyName] = cfg[keyName];
                    }
                }
            }
            var evt = {
                name : "changingEnvironment",
                changedProperties : keys,
                asyncCalls : 1
            };
            evt.callback = {
                fn : function () {
                    evt.asyncCalls--;
                    if (evt.asyncCalls <= 0) {
                        evt.callback.fn = null;
                        evt = null;
                        keys = null;
                        this.$callback(callback);
                    }
                },
                scope : this
            };
            this.$raiseEvent(evt);
            this.$raiseEvent({
                name : "environmentChanged",
                changedProperties : keys
            });
            this.$callback(evt.callback);
        }
function (cfg, callback, update) {
            update = !!update;
            var keys = ariaUtilsObject.keys(cfg);
            if (update) {
                ariaUtilsJson.inject(cfg, this.applicationSettings, true);
            } else {
                if (keys.length === 0) {
                    // reset stored application settings
                    this.applicationSettings = {};
                    keys = null;
                } else {
                    for (var i = 0; i < keys.length; i++) {
                        var keyName = keys[i];
                        this.applicationSettings[keyName] = cfg[keyName];
                    }
                }
            }
            var evt = {
                name : "changingEnvironment",
                changedProperties : keys,
                asyncCalls : 1
            };
            evt.callback = {
                fn : function () {
                    evt.asyncCalls--;
                    if (evt.asyncCalls <= 0) {
                        evt.callback.fn = null;
                        evt = null;
                        keys = null;
                        this.$callback(callback);
                    }
                },
                scope : this
            };
            this.$raiseEvent(evt);
            this.$raiseEvent({
                name : "environmentChanged",
                changedProperties : keys
            });
            this.$callback(evt.callback);
        }
function ( cfg , callback , update ) { update = ! ! update ; var keys = ariaUtilsObject . keys ( cfg ) ; if ( update ) { ariaUtilsJson . inject ( cfg , this . applicationSettings , true ) ; } else { if ( keys . length === 0 ) { // reset stored application settings this . applicationSettings = { } ; keys = null ; } else { for ( var i = 0 ; i < keys . length ; i ++ ) { var keyName = keys [ i ] ; this . applicationSettings [ keyName ] = cfg [ keyName ] ; } } } var evt = { name : "changingEnvironment" , changedProperties : keys , asyncCalls : 1 } ; evt . callback = { fn : function ( ) { evt . asyncCalls -- ; if ( evt . asyncCalls <= 0 ) { evt . callback . fn = null ; evt = null ; keys = null ; this . $callback ( callback ) ; } } , scope : this } ; this . $raiseEvent ( evt ) ; this . $raiseEvent ( { name : "environmentChanged" , changedProperties : keys } ) ; this . $callback ( evt . callback ) ; }
Stores the application variables. Please refer to documentation for parameter types.
@public
@param {Object} cfg Configuration object
@param {aria.core.CfgBeans:Callback} cb Method to be called after the setting is done
@param {Boolean} update flag to update existing application settings, when false will overwrite existing with
new settings.
Stores the application variables . Please refer to documentation for parameter types .