Class ConfigPropertyBuilder

java.lang.Object
nxt.configuration.ConfigPropertyBuilder

public class ConfigPropertyBuilder extends Object
  • Method Details

    • createStringProperty

      public static ConfigPropertyBuilder createStringProperty(String name, String defaultValue, String description)
      Creates a configuration metadata definition for a string property.
      Parameters:
      name - the name of the property
      defaultValue - the default value of the property, can be empty but not null
      description - the description of the property
      Returns:
      a configuration metadata definition
    • createStringListProperty

      public static ConfigPropertyBuilder createStringListProperty(String name, List<String> defaultValue, String description)
      Creates a configuration metadata definition for a string list property.
      Parameters:
      name - the name of the property
      defaultValue - the default value of the property, can be empty but not null
      description - the description of the property
      Returns:
      a configuration metadata definition
    • createBooleanProperty

      public static ConfigPropertyBuilder createBooleanProperty(String name, boolean defaultValue, String description)
      Creates a configuration metadata definition for a boolean property.
      Parameters:
      name - the name of the property
      defaultValue - the default value of the property
      description - the description of the property
      Returns:
      a configuration metadata definition
    • createIntegerProperty

      public static ConfigPropertyBuilder createIntegerProperty(String name, int defaultValue, String description)
      Creates a configuration metadata definition for an integer property.
      Parameters:
      name - the name of the property
      defaultValue - the default value of the property
      description - the description of the property
      Returns:
      a configuration metadata definition
    • createAccountProperty

      public static ConfigPropertyBuilder createAccountProperty(String name, Long defaultValue, String description)
      Creates a configuration metadata definition for an account property.
      Parameters:
      name - the name of the property
      defaultValue - the default value of the property, set to null for an empty default value
      description - the description of the property
      Returns:
      a configuration metadata definition
    • createAccountListProperty

      public static ConfigPropertyBuilder createAccountListProperty(String name, List<Long> defaultValue, String description)
      Creates a configuration metadata definition for an account list property.
      Parameters:
      name - the name of the property
      defaultValue - the default value of the property, can be empty but not null
      description - the description of the property
      Returns:
      a configuration metadata definition
    • createPasswordProperty

      public static ConfigPropertyBuilder createPasswordProperty(String name, String defaultValue, String description)
      Creates a configuration metadata definition for a password property.
      Parameters:
      name - the name of the property
      defaultValue - the default value of the property, can be empty but not null
      description - the description of the property
      Returns:
      a configuration metadata definition
    • setMin

      public ConfigPropertyBuilder setMin(Integer min)
      Parameters:
      min - the defined minimum value, set to null to disable the constraint
      Returns:
      this, to continue building
    • setMax

      public ConfigPropertyBuilder setMax(Integer max)
      Parameters:
      max - the defined maximum value, set to null to disable the constraint
      Returns:
      this, to continue building