com.softslate.commerce.businessobjects.core
Interface Settings

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
SettingsBean

public interface Settings
extends java.io.Serializable

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
 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.
 

Method Detail

getMap

java.util.Map getMap()
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.

Returns:
The Map of settings keys and values for this Settings instance.

setMap

void setMap(java.util.Map map)
Sets the map of settings values for this Settings instance.


setValue

void setValue(java.lang.String key,
              java.lang.Object value)
Sets the value of a given key in this Settings' map.

Parameters:
key - The key whose value is being set
value - The value.
Throws:
java.lang.Exception

getValue

java.lang.Object getValue(java.lang.String key)
Gets the value of a given key in this Settings' map.

Parameters:
key - The key whose value is to be retrieved.
Returns:
The value of the setting.
Throws:
java.lang.Exception

initialize

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

Throws:
java.lang.Exception


Copyright ? SoftSlate, LLC 2003?2005