Class SaUserSettingImpl

java.lang.Object
com.saperion.settings.SaUserSettingImpl
All Implemented Interfaces:
SaSetting, SaUserSetting, Serializable

public class SaUserSettingImpl extends Object implements SaUserSetting, Serializable
System setting implementation. This class holds all system settings accessible by the class name of the specific SaUserSettingType.
Author:
mak
See Also:
  • Constructor Details

    • SaUserSettingImpl

      public SaUserSettingImpl(String key)
      Constructor.
      Parameters:
      key - the access key
  • Method Details

    • getEntry

      public final <T extends SaUserSettingType> T getEntry(Class<T> klass)
      Returns the specific user setting.
      Specified by:
      getEntry in interface SaUserSetting
      Type Parameters:
      T - specialized SaUserSettingType
      Parameters:
      klass - class representing the key the stored setting can be
      Returns:
      the concrete SaUserSettingType instance
    • setEntry

      public final <T extends SaUserSettingType> void setEntry(Class<T> klass, T setting)
      Sets the user setting.
      Specified by:
      setEntry in interface SaUserSetting
      Type Parameters:
      T - specialized SaUserSettingType
      Parameters:
      klass - class representing the key the setting is stored
      setting - the concrete SaUserSettingType instance
    • hasEntry

      public final <T extends SaUserSettingType> boolean hasEntry(Class<T> klass)
      Checks, if the system setting for the given key exists.
      Specified by:
      hasEntry in interface SaUserSetting
      Type Parameters:
      T - specialized SaUserSettingType
      Parameters:
      klass - class
      Returns:
      true if a system setting exists to the given key, otherwise false
    • getAccessKey

      public final String getAccessKey()
      Returns the access key the setting is associated to.
      Specified by:
      getAccessKey in interface SaSetting
      Returns:
      the access key