Class PropertyMetadata<T>

  • Type Parameters:
    T - Property value type

    @ProviderType
    public final class PropertyMetadata<T>
    extends Object
    Defines a configuration property.
    • Field Detail

      • SUPPORTED_TYPES

        public static final Set<Class<?>> SUPPORTED_TYPES
        Set with all types support for property metadata (not including nested configurations).
    • Constructor Detail

      • PropertyMetadata

        public PropertyMetadata​(@NotNull
                                @NotNull String name,
                                @NotNull
                                @NotNull Class<T> type)
        Parameters:
        name - Property name
        type - Property type
      • PropertyMetadata

        public PropertyMetadata​(@NotNull
                                @NotNull String name,
                                @NotNull
                                T defaultValue)
        Parameters:
        name - Property name
        defaultValue - Default value (also defines property type)
    • Method Detail

      • getType

        @NotNull
        public @NotNull Class<T> getType()
        Returns:
        Parameter type
      • getDefaultValue

        public T getDefaultValue()
        Returns:
        Default value if parameter is not set for configuration
      • defaultValue

        public PropertyMetadata<T> defaultValue​(T value)
        Parameters:
        value - Default value if parameter is not set for configuration
        Returns:
        this;
      • getOrder

        public int getOrder()
        Returns:
        Number to control property order in configuration editor.
      • order

        public PropertyMetadata<T> order​(int value)
        Parameters:
        value - Number to control property order in configuration editor.
        Returns:
        this
      • getConfigurationMetadata

        public ConfigurationMetadata getConfigurationMetadata()
        Returns:
        Metadata for nested configuration
      • configurationMetadata

        public PropertyMetadata<T> configurationMetadata​(ConfigurationMetadata configurationMetadata)
        Parameters:
        configurationMetadata - Metadata for nested configuration
        Returns:
        this;
      • isNestedConfiguration

        public boolean isNestedConfiguration()
        Returns:
        true if this property describes a nested configuration. In this case it is ensured configuration metadata is present, and the type is ConfigurationMetadata or ConfigurationMetadata[].
      • toString

        public String toString()
      • getName

        @NotNull
        public @NotNull String getName()
        Returns:
        Parameter name
      • getLabel

        public String getLabel()
        Returns:
        Label
      • label

        public T label​(String label)
        Parameters:
        label - Label
        Returns:
        this;
      • getDescription

        public String getDescription()
        Returns:
        Description
      • description

        public T description​(String description)
        Parameters:
        description - Description
        Returns:
        this;
      • getProperties

        public Map<String,​String> getProperties()
        Returns:
        Further properties for documentation and configuration of behavior in configuration editor.
      • properties

        public T properties​(Map<String,​String> properties)
        Parameters:
        properties - Further properties for documentation and configuration of behavior in configuration editor.
        Returns:
        this;