Interface Settings

All Superinterfaces:
BusinessObject, Serializable
All Known Implementing Classes:
SettingsBean

public interface Settings extends BusinessObject, 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 Details

    • getMap

      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(Map map)
      Sets the map of settings values for this Settings instance.
    • setValue

      void setValue(String key, String value)
      Sets the value of a given key in this Settings' map.
      Parameters:
      key - The key whose value is being set
      value - The value.
    • getValue

      String getValue(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.
    • initialize

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

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

      Settings copyAndAlter(Map settingsToAlter) throws 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:
      Exception
    • loadSettingsByType

      Map loadSettingsByType(String settingType) throws Exception
      Throws:
      Exception
    • loadSettingsAndCount

      Map loadSettingsAndCount(Map parameters) throws Exception
      Throws:
      Exception
    • addSetting

      Map addSetting(Map parameters) throws Exception
      Throws:
      Exception
    • loadSettingFromID

      Setting loadSettingFromID(Map paramaters) throws Exception
      Throws:
      Exception
    • editSetting

      Map editSetting(Map parameters) throws Exception
      Throws:
      Exception
    • deleteSetting

      void deleteSetting(Map parameters) throws Exception
      Throws:
      Exception
    • editDeleteUserSettings

      Map editDeleteUserSettings(Map parameters) throws Exception
      Throws:
      Exception
    • processSettings

      Settings processSettings(Map parameters) throws Exception
      Throws:
      Exception
    • loadSettings

      Collection loadSettings() throws Exception
      Throws:
      Exception
    • postChangingSettingEvent

      Map postChangingSettingEvent(Setting setting, Map parameters) throws Exception
      Throws:
      Exception