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.void
deleteSetting
(Map parameters) editDeleteUserSettings
(Map parameters) editSetting
(Map parameters) getMap()
Retrieves the map of settings values for thisSettings
instance.Gets the value of a given key in thisSettings
'map
.void
Initializes thisSettings
instance.loadSettingFromID
(Map paramaters) loadSettingsAndCount
(Map parameters) loadSettingsByType
(String settingType) postChangingSettingEvent
(Setting setting, Map parameters) processSettings
(Map parameters) void
Sets the map of settings values for thisSettings
instance.void
Sets 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 thisSettings
instance. The keys of thisMap
correspond to thecode
field of thesscSetting
database table. The values correspond to value field (integerValue
,smallValue
,mediumValue
, ortextValue
) that corresponds with the value of thevalueType
field.- Returns:
- The
Map
of settings keys and values for thisSettings
instance.
-
setMap
Sets the map of settings values for thisSettings
instance. -
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 thisSettings
instance. Populates themap
property with the results of a query on thesscSetting
database 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
-