Interface IEnumConfigurationStore

    • Method Detail

      • readConfigurationValue

        <D> IEnumConfigurationValue<D> readConfigurationValue​(java.lang.String configurationKey)
                                                       throws EnumConfigurationStoreException
        Read a configuration value. In case of missing value a possible defined default value from the enum configuration annotation will be returned.
        Type Parameters:
        D - the configuration value type
        Parameters:
        configurationKey - the unique configuration key (by default started by the name in lower case and dot notation, separated by # and the key depending of the IEnumConfigurationKeyResolver).
        Returns:
        value the value
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • readConfigurationValue

        <D,​T extends java.lang.Enum<T>> IEnumConfigurationValue<D> readConfigurationValue​(T configurationKey)
                                                                                         throws EnumConfigurationStoreException
        Read a configuration value. In case of missing value a possible defined default value from the enum configuration annotation will be returned.
        Type Parameters:
        D - the configuration value type
        T - the generic configuration name
        Parameters:
        configurationKey - the configuration key
        Returns:
        value the value
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • readConfigurationValueIgnoreDefault

        <D> IEnumConfigurationValue<D> readConfigurationValueIgnoreDefault​(java.lang.String configurationKey)
                                                                    throws EnumConfigurationStoreException
        Read a configuration value. In case of missing the value a possible defined default value in the enum configuration will be ignored.
        Type Parameters:
        D - the configuration value type
        Parameters:
        configurationKey - the unique configuration key (by default started by the name in lower case and dot notation, separated by # and the key depending of the IEnumConfigurationKeyResolver).
        Returns:
        value the value
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • readConfigurationValueIgnoreDefault

        <D,​T extends java.lang.Enum<T>> IEnumConfigurationValue<D> readConfigurationValueIgnoreDefault​(T configurationKey)
                                                                                                      throws EnumConfigurationStoreException
        Read a configuration value. In case of missing the value a possible defined default value in the enum configuration will be ignored.
        Type Parameters:
        D - the configuration value type
        T - the generic configuration name
        Parameters:
        configurationKey - the configuration key
        Returns:
        value the value
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • writeConfigurationValue

        <D> void writeConfigurationValue​(java.lang.String configurationKey,
                                         java.lang.String value)
                                  throws EnumConfigurationStoreException
        Write a configuration value.
        Type Parameters:
        D - the configuration value type
        Parameters:
        configurationKey - the unique configuration key (by default started by the name in lower case and dot notation, separated by # and the key depending of the IEnumConfigurationKeyResolver).
        value - the value
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be written
      • writeConfigurationValue

        <D,​T extends java.lang.Enum<T>> void writeConfigurationValue​(T configurationKey,
                                                                           java.lang.String value)
                                                                    throws EnumConfigurationStoreException
        Write a configuration value.
        Type Parameters:
        D - the configuration value type
        T - the generic configuration name
        Parameters:
        configurationKey - the configuration key
        value - the value
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be written
      • writeConfigurationValue

        <T extends java.lang.Enum<T>> void writeConfigurationValue​(java.lang.String configurationKey,
                                                                   java.lang.Object value)
                                                            throws EnumConfigurationStoreException
        Write a configuration value.
        Type Parameters:
        T - the generic configuration name
        Parameters:
        configurationKey - the unique configuration key (by default started by the name in lower case and dot notation, separated by # and the key depending of the IEnumConfigurationKeyResolver).
        value - the value
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be written
      • writeConfigurationValue

        <T extends java.lang.Enum<T>> void writeConfigurationValue​(T configurationKey,
                                                                   java.lang.Object value)
                                                            throws EnumConfigurationStoreException
        Write a configuration value.
        Type Parameters:
        T - the generic configuration name
        Parameters:
        configurationKey - the configuration key
        value - the value
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be written
      • readConfigurationValueList

        java.util.Properties readConfigurationValueList​(java.lang.String... configurationKeys)
                                                 throws EnumConfigurationStoreException
        Read a list of configuration values. In case of missing value a possible defined default value from the enum configuration annotation will be returned.
        Parameters:
        configurationKeys - the unique configuration keys (by default started by the name in lower case and dot notation, separated by # and the key depending of the IEnumConfigurationKeyResolver).
        Returns:
        the read configuration properties
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • readConfigurationValueList

        <T extends java.lang.Enum<T>> java.util.Properties readConfigurationValueList​(T[] configurationKeys)
                                                                               throws EnumConfigurationStoreException
        Read a list of configuration values. In case of missing value a possible defined default value from the enum configuration annotation will be returned.
        Type Parameters:
        T - the generic configuration name
        Parameters:
        configurationKeys - the configuration keys
        Returns:
        the read configuration properties where the key corresponds to a valid configuration key
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • readConfigurationValueListIgnoreDefault

        java.util.Properties readConfigurationValueListIgnoreDefault​(java.lang.String... configurationKeys)
                                                              throws EnumConfigurationStoreException
        Read a list of configuration values. In case of missing the value a possible defined default value in the enum configuration will be ignored.
        Parameters:
        configurationKeys - the unique configuration keys (by default started by the name in lower case and dot notation, separated by # and the key depending of the IEnumConfigurationKeyResolver).
        Returns:
        the read configuration properties
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • readConfigurationValueListIgnoreDefault

        <T extends java.lang.Enum<T>> java.util.Properties readConfigurationValueListIgnoreDefault​(T[] configurationKeys)
                                                                                            throws EnumConfigurationStoreException
        Read a list of configuration values. In case of missing the value a possible defined default value in the enum configuration will be ignored.
        Type Parameters:
        T - the generic configuration name
        Parameters:
        configurationKeys - the configuration keys
        Returns:
        the read configuration properties where the key corresponds to a valid configuration key
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • writeConfigurationValueList

        void writeConfigurationValueList​(java.util.Properties configuration)
                                  throws EnumConfigurationStoreException
        Write a list of configuration values. All other values in the store are not touched.
        Parameters:
        configuration - the configuration properties where the key corresponds to a valid configuration key
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • writeConfigurationValueList

        java.util.Properties writeConfigurationValueList​(java.util.Properties configuration,
                                                         boolean removeEntriesWithMissingKey)
                                                  throws EnumConfigurationStoreException
        Write a list of configuration values. Be careful in case of removeEntriesWithMissingKeys = true, it deletes not covered data.
        Parameters:
        configuration - the configuration properties where the key corresponds to a valid configuration key
        removeEntriesWithMissingKey - true to remove all entries on store which are not listed in the over given configuration
        Returns:
        the deleted configuration properties
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • deleteConfigurationValue

        <D> IEnumConfigurationValue<D> deleteConfigurationValue​(java.lang.String configurationKey)
                                                         throws EnumConfigurationStoreException
        Deletes a configuration value.
        Type Parameters:
        D - the configuration value type
        Parameters:
        configurationKey - the unique configuration key (by default started by the name in lower case and dot notation, separated by # and the key depending of the IEnumConfigurationKeyResolver).
        Returns:
        the deleted configuration value or null
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • deleteConfigurationValue

        <D,​T extends java.lang.Enum<T>> IEnumConfigurationValue<D> deleteConfigurationValue​(T configurationKey)
                                                                                           throws EnumConfigurationStoreException
        Deletes a configuration value.
        Type Parameters:
        D - the configuration value type
        T - the generic configuration name
        Parameters:
        configurationKey - the configuration key
        Returns:
        the deleted configuration value or null
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • deleteConfigurationValueList

        java.util.Properties deleteConfigurationValueList​(java.lang.String... configurationKeys)
                                                   throws EnumConfigurationStoreException
        Deletes a list of configuration values.
        Parameters:
        configurationKeys - the unique configuration key (by default started by the name in lower case and dot notation, separated by # and the key depending of the IEnumConfigurationKeyResolver).
        Returns:
        the deleted configuration properties where the key corresponds to a valid configuration key
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • deleteConfigurationValueList

        <T extends java.lang.Enum<T>> java.util.Properties deleteConfigurationValueList​(T[] configurationKeys)
                                                                                 throws EnumConfigurationStoreException
        Deletes a list of configuration values.
        Type Parameters:
        T - the generic configuration name
        Parameters:
        configurationKeys - the configuration keys
        Returns:
        the deleted configuration properties where the key corresponds to a valid configuration key
        Throws:
        EnumConfigurationStoreException - in case the enum configuration cannot be accessed
      • getEnumConfigurationKeyResolver

        IEnumConfigurationKeyResolver getEnumConfigurationKeyResolver()
        Get the configuration key resolver.
        Returns:
        the configuration key resolver.