Interface ChangeableConfiguration
- All Superinterfaces:
Configuration,Serializable
- All Known Subinterfaces:
ChangeableActivityConfiguration
This interface extends the
Configuration by the means to change
the configuration values.
There are no means to distinguish between a non-present configuration entry and an entry with a null value. Users of this interface have to use an appropriate semantic for their configuration.
A configuration value may be fixed. This has to be checked before setting a value!
- Author:
- Ulrich Kreher
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.aristaflow.adept2.model.common.Configuration
Configuration.ConfigurationIDs -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longGenerated ID for serialisation. -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves the value for the entry with the designated name from this configuration.voidsetBoolean(String entryName, boolean value) Sets the boolean configuration value provided under the designated entry name.voidSets theDateconfiguration value provided under the designated entry name.voidSets the float configuration value provided under the designated entry name.voidsetInteger(String entryName, long value) Sets the integer configuration value provided under the designated entry name.voidSets the configuration value provided under the designated entry name as string which will always work even if the designated entry is of another type.voidSets theUDTValueconfiguration value provided under the designated entry name.voidSets the URI configuration value provided under the designated entry name.Methods inherited from interface de.aristaflow.adept2.model.common.Configuration
getAllEntries, getBoolean, getConfigurationID, getDate, getFloat, getInteger, getString, getUDT, getURI, isFixed
-
Field Details
-
serialVersionUID
static final long serialVersionUIDGenerated ID for serialisation.- See Also:
-
-
Method Details
-
setBoolean
Sets the boolean configuration value provided under the designated entry name. Please check in advance whether this key refers to a boolean configuration value.- Parameters:
entryName- The name of the entry for which to set the boolean value of.value- A boolean configuration value for the designated entry name.
-
setInteger
Sets the integer configuration value provided under the designated entry name. Please check in advance whether this key refers to an integer configuration value.- Parameters:
entryName- The name of the entry for which to set the integer value of.value- An integer configuration value for the designated entry name.
-
setFloat
Sets the float configuration value provided under the designated entry name. Please check in advance whether this key refers to a float configuration value.- Parameters:
entryName- The name of the entry for which to set the float value of.value- A float configuration value for the designated entry name.
-
setString
Sets the configuration value provided under the designated entry name as string which will always work even if the designated entry is of another type. Please check the type in advance and use the appropriate string conversion for the corresponding type. Otherwise a null value may be returned when using type-safe access due to a failing conversion.
The value must not benull. Note that the empty string is not a valid typed value and therefore it will be interpreted asnullwhen accessing it with a type-safe method. However, the empty string will be returned viaConfiguration.getString(String).- Parameters:
entryName- The name of the entry for which to set the (string representation of the) configuration value of.value- A (string representation of the) configuration value for the designated entry name.
-
setURI
Sets the URI configuration value provided under the designated entry name. Use null if the value should be unset. Please check in advance whether this key refers to a URI configuration value.- Parameters:
entryName- The name of the entry for which to set the URI value of.value- A URI configuration value for the designated entry name or null in case the value is unset.
-
setDate
Sets theDateconfiguration value provided under the designated entry name. This must not benull. Please check in advance whether this entry refers to aDateconfiguration value.- Parameters:
entryName- The name of the entry for which to set theDatevalue of.value- ADateconfiguration value for the designated entry name. This must not benull.
-
setUDT
Sets theUDTValueconfiguration value provided under the designated entry name. This must not benull. Please check in advance whether this entry refers to aUDTValueconfiguration value.- Parameters:
entryName- The name of the entry for which to set theUDTValuevalue of.value- AUDTValueconfiguration value for the designated entry name. This must not benull.
-
remove
Removes the value for the entry with the designated name from this configuration. Calling this method will have no effects if the value of the designated entry does not exist.- Parameters:
entryName- The name of the configuration entry to remove from this configuration. This must neither be null nor the empty string.
-