Interface ChangeableConfiguration
-
- All Superinterfaces:
Configuration,Serializable
- All Known Subinterfaces:
ChangeableActivityConfiguration
public interface ChangeableConfiguration extends Configuration
This interface extends theConfigurationby 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 longserialVersionUIDGenerated ID for serialisation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidremove(String entryName)Removes 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.voidsetDate(String entryName, Date value)Sets theDateconfiguration value provided under the designated entry name.voidsetFloat(String entryName, double value)Sets 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.voidsetString(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.voidsetUDT(String entryName, byte[] value)Sets theUDTValueconfiguration value provided under the designated entry name.voidsetURI(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 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
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 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
void setUDT(String entryName, byte[] value)
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
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.
-
-