Annotation Type EnumKeyValueConfiguration


  • @Target(FIELD)
    @Retention(RUNTIME)
    @Inherited
    @Documented
    public @interface EnumKeyValueConfiguration
    Defines the enumeration as a value based configuration.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String description
      Defines the description of the enumeration configuration.
      java.lang.String exampleValue
      An example value.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String cardinality
      The cardinality expression for an entry.
      EnumKeyValueConfiguration.DataType dataType
      The configuration value data type.
      java.lang.String defaultValue
      The default value.
      java.lang.String enumerationValue
      An enumeration value: If this is defined, only an enumeration value is accepted for defaultValue, exampleValue and value.
      boolean isConfidential
      Determines whether the configuration value is confidential.
      boolean isUniqueness
      Specifies that the input value is unique.
      java.lang.String maxValue
      The maximal value, e.g. by a string it corresponds to the maximal length of the string.
      java.lang.String minValue
      The minimum value, e.g. by a string it corresponds to the minimum length of the string.
      java.lang.String validFrom
      Defines the valid from date of the enumeration configuration.
      java.lang.String validTill
      Defines the valid till date of the enumeration configuration.
    • Element Detail

      • description

        java.lang.String description
        Defines the description of the enumeration configuration.
        Returns:
        The description of the enumeration configuration.
      • exampleValue

        java.lang.String exampleValue
        An example value. The example value belongs to the dataType, minValue/maxValue and the cardinality.
        Returns:
        An example value.
      • dataType

        EnumKeyValueConfiguration.DataType dataType
        The configuration value data type.
        Returns:
        The configuration value data type..
        Default:
        com.github.toolarium.enumeration.configuration.annotation.EnumKeyValueConfiguration.DataType.STRING
      • defaultValue

        java.lang.String defaultValue
        The default value. The default value belongs to the dataType, minValue/maxValue and the cardinality.
        Returns:
        The default value.
        Default:
        ""
      • enumerationValue

        java.lang.String enumerationValue
        An enumeration value: If this is defined, only an enumeration value is accepted for defaultValue, exampleValue and value. The enumeration value belongs to the dataType, minValue/maxValue and the cardinality.
        Returns:
        An example value.
        Default:
        ""
      • minValue

        java.lang.String minValue
        The minimum value, e.g. by a string it corresponds to the minimum length of the string. In case of a number its the minimum value. Empty means no minimum restriction.
        Returns:
        The minimum value.
        Default:
        ""
      • maxValue

        java.lang.String maxValue
        The maximal value, e.g. by a string it corresponds to the maximal length of the string. In case of a number its the maximal value. Empty means no maximal restriction.
        Returns:
        The maximal value.
        Default:
        ""
      • cardinality

        java.lang.String cardinality

        The cardinality expression for an entry. If there is more than one element, the content of the representation corresponds to a JSON array, e.g. [ "My string array", "with 3", "elements (cardinality = 3)" ]. This means the cardinality can be combined with the different data types.

        The cardinality is defined as a range: [min]..[max]:

        • If the cardinality is empty (=blank string), it must be interpreted as 1..1 (min = 1 and max = 1).
        • The min value is optional and can be ignored, e.g. 5 (this corresponds to 1..5)
        • If the max has no limit it can be defined as * or 1..*
        • If the max has no limit and its optional it can be defined as 0..*

        Returns:
        The cardinality expression.
        Default:
        "1..1"
      • isUniqueness

        boolean isUniqueness
        Specifies that the input value is unique. This is only relevant if you have a cardinality.
        Returns:
        True if it is unique; otherwise false, which means that the same value can occur more than once.
        Default:
        false
      • isConfidential

        boolean isConfidential
        Determines whether the configuration value is confidential. In case of persistence it has to be secured.
        Returns:
        Define if the value is confidential.
        Default:
        false
      • validFrom

        java.lang.String validFrom
        Defines the valid from date of the enumeration configuration. By default it's empty which means the current timestamp: DateTimeFormatter.ISO_INSTANT.format(Instant.now().truncatedTo(ChronoUnit.MILLIS)).
        Returns:
        The valid from information
        Default:
        ""
      • validTill

        java.lang.String validTill
        Defines the valid till date of the enumeration configuration. By default it's the "max" timestamp.
        Returns:
        The valid till information
        Default:
        "9999-12-31T12:00:00.000Z"