Package com.inductiveautomation.snap.web
Class Settings
java.lang.Object
com.inductiveautomation.snap.web.Settings
- All Implemented Interfaces:
- RMJSONArchiver.GetClass,- RMJSONArchiver.GetKeys,- RMJSONArchiver.GetValue,- RMJSONArchiver.SetValue,- RMKey.Get,- RMKey.GetSet,- WebFile.Updater
public class Settings
extends Object
implements RMJSONArchiver.GetKeys, RMJSONArchiver.GetValue, RMJSONArchiver.SetValue, RMJSONArchiver.GetClass, RMKey.GetSet, WebFile.Updater
An object to get, set and store site settings.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddListItem(String aKey, Object aValue) Adds a list item.voidaddListItem(String aKey, Object aValue, int anIndex) Adds a list item at given index.protected voidfirePropertyChange(String aName, Object oldVal, Object newVal, int anIndex) Override to forward to parents if present.static SettingsReturns the settings for given file.Returns a value.<T> TReturns a value of a given class.Returns a value.booleangetBoolValue(String aKey) Returns an bool value.booleangetBoolValue(String aKey, boolean aDefault) Returns an bool value.getFile()Returns the source file.floatgetFloatValue(String aKey) Returns a float value.floatgetFloatValue(String aKey, float aDefault) Returns a float value.intgetIntValue(String aKey) Returns an int value.intgetIntValue(String aKey, int aDefault) Returns an int value.Returns a list of keys to be uses to retrieve persistent attributes from an object.Returns a list of keys to be uses to retrieve persistent attributes from an object.getJSONValue(String aKey) Returns a list of keys to be uses to retrieve persistent attributes from an object.getKeyValue(String aKey) Returns a List value.Returns a List value, with option to create if missing.getSettings(String aKey) Returns the settings for key.getSettings(String aKey, boolean doCreate) Returns the settings for key, with option to create if missing.getStringValue(String aKey) Returns as a String value.getStringValue(String aKey, String aDefault) Returns as a String value.voidSets a value.removeListItem(String aKey, int anIndex) Removes a list item at given index.intremoveListItem(String aKey, Object aValue) Removes a list item at given index.voidsetJSONValue(String aKey, Object aValue) Returns a list of keys to be uses to retrieve persistent attributes from an object.booleansetKeyValue(String aKey, Object aValue) protected ObjectSets a value for a simple key without firing property change.toString()Standard toString implementation.voidupdateFile(WebFile aFile) Saves the file.
- 
Constructor Details- 
Settingspublic Settings()Creates new Settings.
- 
SettingsCreates a new Settings from a byte source.
 
- 
- 
Method Details- 
getFileReturns the source file.
- 
getReturns a value.
- 
getReturns a value.
- 
getReturns a value of a given class.
- 
putSets a value.
- 
simplePutSets a value for a simple key without firing property change.
- 
getStringValueReturns as a String value.
- 
getStringValueReturns as a String value.
- 
getBoolValueReturns an bool value.
- 
getBoolValueReturns an bool value.
- 
getIntValueReturns an int value.
- 
getIntValueReturns an int value.
- 
getFloatValueReturns a float value.
- 
getFloatValueReturns a float value.
- 
getListReturns a List value.
- 
getListReturns a List value, with option to create if missing.
- 
addListItemAdds a list item.
- 
addListItemAdds a list item at given index.
- 
removeListItemRemoves a list item at given index.
- 
removeListItemRemoves a list item at given index.
- 
getSettingsReturns the settings for key.
- 
getSettingsReturns the settings for key, with option to create if missing.
- 
firePropertyChangeOverride to forward to parents if present.
- 
getJSONClassDescription copied from interface:RMJSONArchiver.GetClassReturns a list of keys to be uses to retrieve persistent attributes from an object.- Specified by:
- getJSONClassin interface- RMJSONArchiver.GetClass
 
- 
setJSONValueDescription copied from interface:RMJSONArchiver.SetValueReturns a list of keys to be uses to retrieve persistent attributes from an object.- Specified by:
- setJSONValuein interface- RMJSONArchiver.SetValue
 
- 
getJSONValueDescription copied from interface:RMJSONArchiver.GetValueReturns a list of keys to be uses to retrieve persistent attributes from an object.- Specified by:
- getJSONValuein interface- RMJSONArchiver.GetValue
 
- 
getJSONKeysDescription copied from interface:RMJSONArchiver.GetKeysReturns a list of keys to be uses to retrieve persistent attributes from an object.- Specified by:
- getJSONKeysin interface- RMJSONArchiver.GetKeys
 
- 
getKeyValue- Specified by:
- getKeyValuein interface- RMKey.Get
 
- 
setKeyValue- Specified by:
- setKeyValuein interface- RMKey.GetSet
 
- 
toStringStandard toString implementation.
- 
updateFileSaves the file.- Specified by:
- updateFilein interface- WebFile.Updater
 
- 
getReturns the settings for given file.
 
-