Package com.saperion.settings
Class SaUserSettingImpl
- java.lang.Object
-
- com.saperion.settings.SaUserSettingImpl
-
- All Implemented Interfaces:
SaSetting
,SaUserSetting
,java.io.Serializable
public class SaUserSettingImpl extends java.lang.Object implements SaUserSetting, java.io.Serializable
System setting implementation. This class holds all system settings accessible by the class name of the specificSaUserSettingType
.- Author:
- mak
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SaUserSettingImpl(java.lang.String key)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAccessKey()
Returns the access key the setting is associated to.<T extends SaUserSettingType>
TgetEntry(java.lang.Class<T> klass)
Returns the specific user setting.<T extends SaUserSettingType>
booleanhasEntry(java.lang.Class<T> klass)
Checks, if the system setting for the given key exists.<T extends SaUserSettingType>
voidsetEntry(java.lang.Class<T> klass, T setting)
Sets the user setting.
-
-
-
Method Detail
-
getEntry
public final <T extends SaUserSettingType> T getEntry(java.lang.Class<T> klass)
Returns the specific user setting.- Specified by:
getEntry
in interfaceSaUserSetting
- Type Parameters:
T
- specializedSaUserSettingType
- Parameters:
klass
- class representing the key the stored setting can be- Returns:
- the concrete
SaUserSettingType
instance
-
setEntry
public final <T extends SaUserSettingType> void setEntry(java.lang.Class<T> klass, T setting)
Sets the user setting.- Specified by:
setEntry
in interfaceSaUserSetting
- Type Parameters:
T
- specializedSaUserSettingType
- Parameters:
klass
- class representing the key the setting is storedsetting
- the concreteSaUserSettingType
instance
-
hasEntry
public final <T extends SaUserSettingType> boolean hasEntry(java.lang.Class<T> klass)
Checks, if the system setting for the given key exists.- Specified by:
hasEntry
in interfaceSaUserSetting
- Type Parameters:
T
- specializedSaUserSettingType
- Parameters:
klass
- class- Returns:
true
if a system setting exists to the given key, otherwisefalse
-
getAccessKey
public final java.lang.String getAccessKey()
Returns the access key the setting is associated to.- Specified by:
getAccessKey
in interfaceSaSetting
- Returns:
- the access key
-
-