Settings Store

The Infusion Preferences Framework uses a Settings Store to read and write preferences.

fluid.prefs.store

A base grade to be used by any preference setting store. This component uses the following base grades:

fluid.prefs.dataSource

A grade used by fluid.prefs.store; defines placeholders for get and set methods.

Method Placeholder Description
get For retrieving preferences. Should return the preferences
set For saving preferences. Should accept the preferences as an argument.
Note that no particular parameters are prescribed for these methods. It is up to the developer to choose whatever is appropriate for the particular implementation.

fluid.prefs.cookieStore

A settings store grade that uses a cookie for persistence.

MethodImplementation
get
fluid.prefs.cookieStore.get = function (cookieName)
set
fluid.prefs.cookieStore.set = function (settings, cookieOptions)

fluid.prefs.tempStore

A settings store mock that doesn't do persistence. This grade is useful for tests.

MethodImplementation
get fluid.identity
set
fluid.prefs.tempStore.set = function (settings, applier)