readSettingValue(valuePropertyName) {
    let self = this,
      settingKey = this._getSettingKey(valuePropertyName),
      defaultValue = this._getSettingDefaultValue(valuePropertyName),
      type = this._getSettingTypeValue(valuePropertyName);

    if(!settingKey) {
      return new Promise(function(resolve, reject) { reject(); });
    }

    let settingValue = this.get('settings').readUserValue(settingKey, defaultValue, type);
    if(this.get(valuePropertyName) === undefined)
    {
      self.set(valuePropertyName, defaultValue);
    }
    if(settingValue && settingValue.then)
    {
      settingValue.then(function(obj) {
        self.set(valuePropertyName, obj.value);
      }, function(obj) {
        if(obj.defaultValue !== undefined)
        {
          self.set(valuePropertyName, obj.defaultValue);
        }
      });
      return settingValue;
    }
    return new Promise(function(resolve) { resolve(settingValue); });
  }
/**
   * Reads the setting for a given property name from the server. If the SettingKey is not found, a default value is used.
   * @param valuePropertyName The property name to get from the server
   * @private
   */
Reads the setting for a given property name from the server. If the SettingKey is not found, a default value is used.
@param valuePropertyName The property name to get from the server
@private
Reads the setting for a given property name from the server . If the SettingKey is not found a default value is used . @param valuePropertyName The property name to get from the server @private
readSettingValue(valuePropertyName) {
    let self = this,
      settingKey = this._getSettingKey(valuePropertyName),
      defaultValue = this._getSettingDefaultValue(valuePropertyName),
      type = this._getSettingTypeValue(valuePropertyName);
    if(!settingKey) {
      return new Promise(function(resolve, reject) { reject(); });
    }
    let settingValue = this.get('settings').readUserValue(settingKey, defaultValue, type);
    if(this.get(valuePropertyName) === undefined)
    {
      self.set(valuePropertyName, defaultValue);
    }
    if(settingValue && settingValue.then)
    {
      settingValue.then(function(obj) {
        self.set(valuePropertyName, obj.value);
      }, function(obj) {
        if(obj.defaultValue !== undefined)
        {
          self.set(valuePropertyName, obj.defaultValue);
        }
      });
      return settingValue;
    }
    return new Promise(function(resolve) { resolve(settingValue); });
  }
readSettingValue ( valuePropertyName ) { let self = this , settingKey = this . _getSettingKey ( valuePropertyName ) , defaultValue = this . _getSettingDefaultValue ( valuePropertyName ) , type = this . _getSettingTypeValue ( valuePropertyName ) ; if ( ! settingKey ) { return new Promise ( function ( resolve , reject ) { reject ( ) ; } ) ; } let settingValue = this . get ( 'settings' ) . readUserValue ( settingKey , defaultValue , type ) ; if ( this . get ( valuePropertyName ) === undefined ) { self . set ( valuePropertyName , defaultValue ) ; } if ( settingValue && settingValue . then ) { settingValue . then ( function ( obj ) { self . set ( valuePropertyName , obj . value ) ; } , function ( obj ) { if ( obj . defaultValue !== undefined ) { self . set ( valuePropertyName , obj . defaultValue ) ; } } ) ; return settingValue ; } return new Promise ( function ( resolve ) { resolve ( settingValue ) ; } ) ; }
Reads the setting for a given property name from the server.
Reads the setting for a given property name from the server .