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.StringgetAccessKey()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:
getEntryin interfaceSaSystemSetting- Type Parameters:
T- specializedSaSystemSettingType- Parameters:
klass- class- Returns:
- the concrete
SaSystemSettingTypeinstance
-
setEntry
public final <T extends SaSystemSettingType> void setEntry(java.lang.Class<T> klass, T setting)
Sets the system setting.- Specified by:
setEntryin interfaceSaSystemSetting- Type Parameters:
T- specializedSaSystemSettingType- Parameters:
klass- classsetting- the concreteSaSystemSettingTypeinstance
-
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:
hasEntryin interfaceSaSystemSetting- Type Parameters:
T- specializedSaSystemSettingType- Parameters:
klass- class- Returns:
trueif 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:
getAccessKeyin interfaceSaSetting- Returns:
- the access key
-
-