Interface Settings
- All Superinterfaces:
BusinessObject,Serializable
- All Known Implementing Classes:
SettingsBean
Interface representing application settings stored in the database.
While Setting is used as a direct interface to the
sscSetting database table, this interface's methods are what
the rest of the application actually uses to retrieve settings. The
getValue method looks up a given setting in a Map
returned by this interface's getMap method. The keys of this
Map correspond to the code field of the
sscSetting database table. The values correspond to the value
field (integerValue, smallValue,
mediumValue, or textValue) that corresponds
with the value of the valueType field.
The default "settingsImplementer" is
SettingsBean.
- Author:
- David Tobey
-
Method Summary
Modifier and TypeMethodDescriptionaddSetting(Map parameters) copyAndAlter(String name, String value) Returns a new Settings object that is a copy of this one, but with a given element altered.copyAndAlter(Map settingsToAlter) Returns a new Settings object that is a copy of this one, but with certain values altered, as represented in the incoming Map.voiddeleteSetting(Map parameters) editDeleteUserSettings(Map parameters) editSetting(Map parameters) getMap()Retrieves the map of settings values for thisSettingsinstance.Gets the value of a given key in thisSettings'map.voidInitializes thisSettingsinstance.loadSettingFromID(Map paramaters) loadSettingsAndCount(Map parameters) loadSettingsByType(String settingType) postChangingSettingEvent(Setting setting, Map parameters) processSettings(Map parameters) voidSets the map of settings values for thisSettingsinstance.voidSets the value of a given key in thisSettings'map.Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
-
Method Details
-
getMap
Map getMap()Retrieves the map of settings values for thisSettingsinstance. The keys of thisMapcorrespond to thecodefield of thesscSettingdatabase table. The values correspond to value field (integerValue,smallValue,mediumValue, ortextValue) that corresponds with the value of thevalueTypefield.- Returns:
- The
Mapof settings keys and values for thisSettingsinstance.
-
setMap
Sets the map of settings values for thisSettingsinstance. -
setValue
Sets the value of a given key in thisSettings'map.- Parameters:
key- The key whose value is being setvalue- The value.
-
getValue
Gets the value of a given key in thisSettings'map.- Parameters:
key- The key whose value is to be retrieved.- Returns:
- The value of the setting.
-
initialize
Initializes thisSettingsinstance. Populates themapproperty with the results of a query on thesscSettingdatabase table.- Throws:
Exception
-
copyAndAlter
Returns a new Settings object that is a copy of this one, but with a given element altered. The incoming name and value represent the element that is to altered and the new value for it. This is useful in custom code if in an isolated area different settings are needed to perform some custom action.- Parameters:
name-value-- Returns:
- A new Settings object with the new setting value applied to it.
- Throws:
Exception
-
copyAndAlter
Returns a new Settings object that is a copy of this one, but with certain values altered, as represented in the incoming Map.- Parameters:
settingsToAlter- A Map of new settings to apply to the new object.- Returns:
- A new Settings object with the new setting value applied to it.
- Throws:
Exception
-
loadSettingsByType
- Throws:
Exception
-
loadSettingsAndCount
- Throws:
Exception
-
addSetting
- Throws:
Exception
-
loadSettingFromID
- Throws:
Exception
-
editSetting
- Throws:
Exception
-
deleteSetting
- Throws:
Exception
-
editDeleteUserSettings
- Throws:
Exception
-
processSettings
- Throws:
Exception
-
loadSettings
- Throws:
Exception
-
postChangingSettingEvent
- Throws:
Exception
-