Interface ChangeableConfiguration
-
- All Superinterfaces:
Configuration
,Serializable
- All Known Subinterfaces:
ChangeableActivityConfiguration
public interface ChangeableConfiguration extends Configuration
This interface extends theConfiguration
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
Fields Modifier and Type Field Description static long
serialVersionUID
Generated ID for serialisation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
remove(String entryName)
Removes the value for the entry with the designated name from this configuration.void
setBoolean(String entryName, boolean value)
Sets the boolean configuration value provided under the designated entry name.void
setDate(String entryName, Date value)
Sets theDate
configuration value provided under the designated entry name.void
setFloat(String entryName, double value)
Sets the float configuration value provided under the designated entry name.void
setInteger(String entryName, long value)
Sets the integer configuration value provided under the designated entry name.void
setString(String entryName, String value)
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.void
setUDT(String entryName, byte[] value)
Sets theUDTValue
configuration value provided under the designated entry name.void
setURI(String entryName, URI value)
Sets 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 Detail
-
serialVersionUID
static final long serialVersionUID
Generated ID for serialisation.- See Also:
- Constant Field Values
-
-
Method Detail
-
setBoolean
void setBoolean(String entryName, boolean value)
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
void setInteger(String entryName, long value)
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
void setFloat(String entryName, double value)
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
void setString(String entryName, String value)
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 asnull
when 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
void setURI(String entryName, URI value)
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
void setDate(String entryName, Date value)
Sets theDate
configuration value provided under the designated entry name. This must not benull
. Please check in advance whether this entry refers to aDate
configuration value.- Parameters:
entryName
- The name of the entry for which to set theDate
value of.value
- ADate
configuration value for the designated entry name. This must not benull
.
-
setUDT
void setUDT(String entryName, byte[] value)
Sets theUDTValue
configuration value provided under the designated entry name. This must not benull
. Please check in advance whether this entry refers to aUDTValue
configuration value.- Parameters:
entryName
- The name of the entry for which to set theUDTValue
value of.value
- AUDTValue
configuration value for the designated entry name. This must not benull
.
-
remove
void remove(String entryName)
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.
-
-