com.softslate.commerce.businessobjects.core
Class SettingsBean

java.lang.Object
  extended by com.softslate.commerce.businessobjects.core.BaseBusinessObject
      extended by com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
          extended by com.softslate.commerce.businessobjects.core.SettingsBean
All Implemented Interfaces:
BusinessObject, BusinessProcessor, Settings, java.io.Serializable

public class SettingsBean
extends BaseBusinessProcessor
implements Settings, java.io.Serializable

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.

Author:
David Tobey
See Also:
Serialized Form

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 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.
 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, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setSettings, setUser, utils
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

log

static org.apache.commons.logging.Log log

map

private java.util.Map map
See Also:
getMap()
Constructor Detail

SettingsBean

public SettingsBean()
Method Detail

getMap

public java.util.Map getMap()
Description copied from interface: Settings
Retrieves the map of settings values for this Settings 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.

Specified by:
getMap in interface Settings
Returns:
The Map of settings keys and values for this Settings instance.

setMap

public void setMap(java.util.Map map)
Description copied from interface: Settings
Sets the map of settings values for this Settings instance.

Specified by:
setMap in interface Settings

setValue

public void setValue(java.lang.String key,
                     java.lang.Object value)
Description copied from interface: Settings
Sets the value of a given key in this Settings' map.

Specified by:
setValue in interface Settings
Parameters:
key - The key whose value is being set
value - The value.

getValue

public java.lang.Object getValue(java.lang.String key)
Description copied from interface: Settings
Gets the value of a given key in this Settings' map.

Specified by:
getValue in interface Settings
Parameters:
key - The key whose value is to be retrieved.
Returns:
The value of the setting.

initialize

public void initialize()
                throws java.lang.Exception
Description copied from interface: Settings
Initializes this Settings instance. Populates the map property with the results of a query on the sscSetting database table.

Specified by:
initialize in interface Settings
Throws:
java.lang.Exception


Copyright ? SoftSlate, LLC 2003?2005