|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.core.SettingsBean
public class SettingsBean
Represents various settings used by the application. Settings for the
application are stored in the sscSetting database table. The
various settings represent everything from the default colors and fonts used
by the display templates, to the names of the Java classes that implement
various business object interfaces for the application.
An instance of SettingsBean is created in the Struts layer. It
is initialized there through initialize(), which populates the
map property with the results of a query on the
sscSetting table. For each setting, an entry in the
map is created with the setting code used as the key and its
value as the key's value.
The SettingsBean instance created in the Struts layer is
passed throughout the application to look up needed settings. The
application's BusinessObjectFactory initializes each business
object with the SettingsBean immediately after it creates it.
| Field Summary | |
|---|---|
(package private) static org.apache.commons.logging.Log |
log
|
private java.util.Map |
map
|
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
SettingsBean()
|
|
| Method Summary | |
|---|---|
java.util.Map |
addSetting(java.util.Map parameters)
|
Settings |
copyAndAlter(java.util.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. |
Settings |
copyAndAlter(java.lang.String name,
java.lang.String value)
Returns a new Settings object that is a copy of this one, but with a given element altered. |
void |
deleteSetting(java.util.Map parameters)
|
void |
editDeleteUserSettings(java.util.Map parameters)
|
java.util.Map |
editSetting(java.util.Map parameters)
|
java.util.Map |
getMap()
Retrieves the map of settings values for this Settings
instance. |
java.lang.Object |
getValue(java.lang.String key)
Gets the value of a given key in this Settings'
map. |
void |
initialize()
Initializes this Settings instance. |
Setting |
loadSettingFromID(java.util.Map parameters)
|
java.util.Collection |
loadSettings()
|
java.util.Map |
loadSettingsAndCount(java.util.Map parameters)
|
Settings |
processSettings(java.util.Map parameters)
|
void |
setMap(java.util.Map map)
Sets the map of settings values for this Settings
instance. |
void |
setValue(java.lang.String key,
java.lang.Object value)
Sets the value of a given key in this Settings'
map. |
| Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor |
|---|
formatDateTime, formatPrice, getAppComponents, getAppSettings, getAttributeIDs, getBusinessObjectFactory, getDaoFactory, getProductIDs, getSettings, getUser, initialize, loadMatchingSkus, parseDateTime, parseResponseData, prepareRequestData, sendHTTPPost, sendHTTPPost, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setSettings, setUser, updateOrderTotals, updateOrderTotals, utils |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
static org.apache.commons.logging.Log log
private java.util.Map map
getMap()| Constructor Detail |
|---|
public SettingsBean()
| Method Detail |
|---|
public java.util.Map getMap()
SettingsSettings
instance. The keys of this Map correspond to the
code field of the sscSetting database
table. The values correspond to value field (integerValue,
smallValue, mediumValue, or
textValue) that corresponds with the value of the
valueType field.
getMap in interface SettingsMap of settings keys and values for this
Settings instance.public void setMap(java.util.Map map)
SettingsSettings
instance.
setMap in interface Settings
public void setValue(java.lang.String key,
java.lang.Object value)
SettingsSettings'
map.
setValue in interface Settingskey - The key whose value is being setvalue - The value.public java.lang.Object getValue(java.lang.String key)
SettingsSettings'
map.
getValue in interface Settingskey - The key whose value is to be retrieved.
public void initialize()
throws java.lang.Exception
SettingsSettings instance. Populates the
map property with the results of a query on the
sscSetting database table.
initialize in interface Settingsjava.lang.Exception
public Settings copyAndAlter(java.lang.String name,
java.lang.String value)
throws java.lang.Exception
Settings
copyAndAlter in interface Settingsjava.lang.Exception
public Settings copyAndAlter(java.util.Map settingsToAlter)
throws java.lang.Exception
Settings
copyAndAlter in interface SettingssettingsToAlter - A Map of new settings to apply to the new object.
java.lang.Exception
public Settings processSettings(java.util.Map parameters)
throws java.lang.Exception
processSettings in interface Settingsjava.lang.Exception
public java.util.Collection loadSettings()
throws java.lang.Exception
loadSettings in interface Settingsjava.lang.Exception
public java.util.Map loadSettingsAndCount(java.util.Map parameters)
throws java.lang.Exception
loadSettingsAndCount in interface Settingsjava.lang.Exception
public java.util.Map addSetting(java.util.Map parameters)
throws java.lang.Exception
addSetting in interface Settingsjava.lang.Exception
public Setting loadSettingFromID(java.util.Map parameters)
throws java.lang.Exception
loadSettingFromID in interface Settingsjava.lang.Exception
public java.util.Map editSetting(java.util.Map parameters)
throws java.lang.Exception
editSetting in interface Settingsjava.lang.Exception
public void deleteSetting(java.util.Map parameters)
throws java.lang.Exception
deleteSetting in interface Settingsjava.lang.Exception
public void editDeleteUserSettings(java.util.Map parameters)
throws java.lang.Exception
editDeleteUserSettings in interface Settingsjava.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||