UNPKG

gpii-universal

Version:

Cross platform, core components of the GPII personalization infrastructure.

44 lines (36 loc) 1.2 kB
/*! Copyright 2017-2018 OCAD university Licensed under the New BSD license. You may not use this file except in compliance with this License. You may obtain a copy of the License at https://github.com/GPII/universal/blob/master/LICENSE.txt */ "use strict"; var fluid = fluid || require("infusion"); var gpii = fluid.registerNamespace("gpii"); fluid.registerNamespace("gpii.preferencesServer"); // The type of preferences safes gpii.preferencesServer.prefsSafeType = fluid.freezeRecursive({ user: "user", snapset: "snapset" }); gpii.preferencesServer.defaultPrefsSetId = "gpii-default"; // Error messages gpii.preferencesServer.errors = fluid.freezeRecursive({ missingGpiiKey: { errorCode: "GPII_ERR_NO_GPIIKEY", message: "GPII key does not exist" }, gpiiKeyExists: { errorCode: "GPII_ERR_GPIIKEY_EXISTS", message: "GPII key \"%gpiiKey\" already exists" }, readOnly: { errorCode: "GPII_ERR_READONLY", message: "Can't update preferences for readOnly GPII key \"%gpiiKey\" (perhaps it is a snapset)" }, missingPreferences: { errorCode: "GPII_ERR_NO_PREFS", message: "Missing preferences" } });