Package com.saperion.settings
Class SaSystemSettingImpl
- java.lang.Object
-
- com.saperion.settings.SaSystemSettingImpl
-
- All Implemented Interfaces:
SaSetting
,SaSystemSetting
,java.io.Serializable
public class SaSystemSettingImpl extends java.lang.Object implements SaSystemSetting, java.io.Serializable
System setting implementation. This class holds all system settings accessible by the class name of the specificSaSystemSettingType
.- Author:
- mak
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SaSystemSettingImpl(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 SaSystemSettingType>
TgetEntry(java.lang.Class<T> klass)
Returns the specific system setting.<T extends SaSystemSettingType>
booleanhasEntry(java.lang.Class<T> klass)
Checks, if the system setting for the given key exists.<T extends SaSystemSettingType>
voidsetEntry(java.lang.Class<T> klass, T setting)
Sets the system setting.
-
-
-
Method Detail
-
getEntry
public final <T extends SaSystemSettingType> T getEntry(java.lang.Class<T> klass)
Returns the specific system setting.- Specified by:
getEntry
in interfaceSaSystemSetting
- Type Parameters:
T
- specializedSaSystemSettingType
- Parameters:
klass
- class- Returns:
- the concrete
SaSystemSettingType
instance
-
setEntry
public final <T extends SaSystemSettingType> void setEntry(java.lang.Class<T> klass, T setting)
Sets the system setting.- Specified by:
setEntry
in interfaceSaSystemSetting
- Type Parameters:
T
- specializedSaSystemSettingType
- Parameters:
klass
- classsetting
- the concreteSaSystemSettingType
instance
-
hasEntry
public final <T extends SaSystemSettingType> boolean hasEntry(java.lang.Class<T> klass)
Checks, if the system setting for the given key exists.- Specified by:
hasEntry
in interfaceSaSystemSetting
- Type Parameters:
T
- specializedSaSystemSettingType
- 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
-
-