ActiveUI

ActiveUI

  • User Guide
  • Developer Documentation

Home > @activeviam/activeui-sdk > SettingsManager

SettingsManager interface

Settings Manager

Signature:

export interface SettingsManager 

Properties

PropertyTypeDescription
addListener(key: SettingKey, callback: Listener<SettingValue>, callImmediately?: boolean) => RemoveListenerListen to the value of the given setting. If callImmediately is set to true, the callback will be called immediately with the current value.
authenticationHolderAuthenticationHolderProxy
canEdit(key: SettingKey) => booleanCheck the origin of the given setting. If it is a permissions file, then editing the setting is not allowed. In other words, return true if the setting key provided is a user setting, and false otherwise.
contentServerInitializationContentServerInitialization | null | undefined
flatBindingSettingsMapBinding
get(key: SettingKey, logIfUnexisting?: boolean) => SettingValueReturn the setting value corresponding to the given key if found, undefined otherwise. Example: settingsManager.get('component.canEdit')
getAll(filteringFunction: (key: SettingKey) => boolean) => SettingValue[]Return all the setting values for which the filtering function, taking as input a setting key, has returned true.
getAndLogIfUnexisting(key: SettingKey) => SettingValueSimilar to get, but logs if the setting key does not exist.
getContentServerUrl() => string | null | undefined
getDefault(key: SettingKey) => SettingValueReturn the initial default value of a setting.
getKeysMatching(filteringFunction: (key: SettingKey) => boolean) => SettingKey[]Return an array of setting keys, for which the filtering function on settings keys has return true.
getOrigins() => SettingsOriginsGet SettingsOrigins.
getSettingsBinding() => BindingWrapper
globalCtxContext
has(key: SettingKey) => booleanReturn true if the setting key provided exist in the settings map, false otherwise.
initialSettingsSettingsMap
isUserOwnPreference(key: SettingKey) => boolean
listenTo(contentServer: ContentServer) => ContentServerInitialization
onSync() => Promise<any>Return a promise that will be resolved when the settings are synchronized with the Content Server. If the SettingsManager doesn't listen to any Content Server, the promise will be resolved immediately.
originsSettingsOrigins
remove(key: SettingKey) => Promise<any>Remove the setting corresponding to the given setting key.
set(key: SettingKey, newValue: SettingValue) => Promise<any>Set the value of a setting if allowed to. A setting cannot be overridden if it is defined in a permissions file. If editing is allowed, the new value will be written synchronously in the settings binding. If attached to a repository, a request will also be made to change the setting by writing into its preferences file.
settingsRepositorySettingsRepository | null | undefined
writeInKey(key: SettingKey, newValue: SettingValue) => void
  • SettingsManager interface
  • Properties
Copyright © 2019 ActiveViam