<NME> pluginDefaults.js
<BEF> ADDFILE
<MSG> Getters are updated for State class

- New Layer and State classes
- Updated getters (now params are stored in State class)

<DFF> @@ -0,0 +1,30 @@
+
+
+var kPluginDomain;
+
+var initDefaults = function(pluginDomain, initialValues) {
+	kPluginDomain = pluginDomain
+
+	var defaults = [[NSUserDefaults standardUserDefaults] objectForKey:kPluginDomain]
+	var defaultValues = {}
+    var dVal;
+
+    for (var key in defaults) {
+    	defaultValues[key] = defaults[key]
+	}
+
+	for (var key in initialValues) {
+		dVal = defaultValues[key]
+		if (dVal == nil) defaultValues[key] = initialValues[key]
+	}
+
+	return defaultValues
+}
+
+var saveDefaults = function(newValues) {
+	if (kPluginDomain) {
+		var defaults = [NSUserDefaults standardUserDefaults]
+		[defaults setObject: newValues forKey: kPluginDomain];
+	}
+}
+

Getters are updated for State class