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

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

copyAndAlter

Settings copyAndAlter(java.lang.String name,
                      java.lang.String value)
                      throws java.lang.Exception
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:
java.lang.Exception

copyAndAlter

Settings copyAndAlter(java.util.Map settingsToAlter)
                      throws java.lang.Exception
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:
java.lang.Exception

loadSettingsAndCount

java.util.Map loadSettingsAndCount(java.util.Map parameters)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

addSetting

java.util.Map addSetting(java.util.Map parameters)
                         throws java.lang.Exception
Throws:
java.lang.Exception

loadSettingFromID

Setting loadSettingFromID(java.util.Map paramaters)
                          throws java.lang.Exception
Throws:
java.lang.Exception

editSetting

java.util.Map editSetting(java.util.Map parameters)
                          throws java.lang.Exception
Throws:
java.lang.Exception

deleteSetting

void deleteSetting(java.util.Map parameters)
                   throws java.lang.Exception
Throws:
java.lang.Exception

editDeleteUserSettings

void editDeleteUserSettings(java.util.Map parameters)
                            throws java.lang.Exception
Throws:
java.lang.Exception

processSettings

Settings processSettings(java.util.Map parameters)
                         throws java.lang.Exception
Throws:
java.lang.Exception

loadSettings

java.util.Collection loadSettings()
                                  throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © SoftSlate, LLC 2003–2005