new Configurable()
Extends
- EventEmitter
Methods
-
getDefaultOptions(){Object}
sdk/core/lib/configurable.js, line 219 -
Returns a hash with the default options
Returns:
Type Description Object -
getOption(optionName){*}
sdk/core/lib/configurable.js, line 181 -
Returns the value for the given option
Name Type Description optionName
String Returns:
Type Description * -
getOptionDefault(optionName){*}
sdk/core/lib/configurable.js, line 199 -
Returns the default value for the given option
Name Type Description optionName
String Returns:
Type Description * -
hasChanges(){Boolean}
sdk/core/lib/configurable.js, line 562 -
Check if the configurable has any options that differ from the default options
Returns:
Type Description Boolean -
hasOption(optionName){Boolean}
sdk/core/lib/configurable.js, line 190 -
Checks if this configurable has an option with the given name
Name Type Description optionName
String Returns:
Type Description Boolean -
optionsEqual(options){Boolean}
sdk/core/lib/configurable.js, line 255 -
Check if the current options equal the given ones
Name Type Description options
Object Returns:
Type Description Boolean -
resetOptions()
sdk/core/lib/configurable.js, line 211 -
Resets the options of the configurable to the default ones.
-
serializeOption(optionName, toObject){*}
sdk/core/lib/configurable.js, line 365 -
Returns a serialized version of the given option
Name Type Default Description optionName
String toObject
Boolean false = false
Returns:
Type Description * -
serializeOptions(toObject){Object}
sdk/core/lib/configurable.js, line 347 -
Returns a serialized version of this configurable
Name Type Default Description toObject
Boolean false = false
Returns:
Type Description Object -
set(options)
sdk/core/lib/configurable.js, line 165 -
Sets the given options
Name Type Description options
Object -
setOption(optionName, value, update, initial)
sdk/core/lib/configurable.js, line 403 -
Sets the value for the given option, validates it
Name Type Default Description optionName
String value
* update
Boolean true optional Should an
update
event be emitted?initial
Boolean false optional Is this the first time this option is set?
-
validateSettings(){Promise}
sdk/core/lib/configurable.js, line 74 -
Checks whether all required options are specified
Returns:
Type Description Promise