Interface ChangeableConfiguration

  • All Superinterfaces:
    Configuration, Serializable
    All Known Subinterfaces:
    ChangeableActivityConfiguration

    public interface ChangeableConfiguration
    extends Configuration
    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
    • 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 the Date 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 the UDTValue 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.
    • 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 be null. Note that the empty string is not a valid typed value and therefore it will be interpreted as null when accessing it with a type-safe method. However, the empty string will be returned via Configuration.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 the Date configuration value provided under the designated entry name. This must not be null. Please check in advance whether this entry refers to a Date configuration value.
        Parameters:
        entryName - The name of the entry for which to set the Date value of.
        value - A Date configuration value for the designated entry name. This must not be null.
      • setUDT

        void setUDT​(String entryName,
                    byte[] value)
        Sets the UDTValue configuration value provided under the designated entry name. This must not be null. Please check in advance whether this entry refers to a UDTValue configuration value.
        Parameters:
        entryName - The name of the entry for which to set the UDTValue value of.
        value - A UDTValue configuration value for the designated entry name. This must not be null.
      • 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.