Class PropertyMetadata<T>

  • Type Parameters:
    T - Property value type

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

      • SUPPORTED_TYPES

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

      • PropertyMetadata

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

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

      • getType

        @NotNull
        public @NotNull java.lang.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 java.lang.String toString()
      • getName

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

        public java.lang.String getLabel()
        Returns:
        Label
      • label

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

        public java.lang.String getDescription()
        Returns:
        Description
      • description

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

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

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