Package nxt.configuration
Class ConfigPropertyBuilder
java.lang.Object
nxt.configuration.ConfigPropertyBuilder
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigPropertyBuildercreateAccountListProperty(String name, List<Long> defaultValue, String description) Creates a configuration metadata definition for an account list property.static ConfigPropertyBuildercreateAccountProperty(String name, Long defaultValue, String description) Creates a configuration metadata definition for an account property.static ConfigPropertyBuildercreateBooleanProperty(String name, boolean defaultValue, String description) Creates a configuration metadata definition for a boolean property.static ConfigPropertyBuildercreateIntegerProperty(String name, int defaultValue, String description) Creates a configuration metadata definition for an integer property.static ConfigPropertyBuildercreatePasswordProperty(String name, String defaultValue, String description) Creates a configuration metadata definition for a password property.static ConfigPropertyBuildercreateStringListProperty(String name, List<String> defaultValue, String description) Creates a configuration metadata definition for a string list property.static ConfigPropertyBuildercreateStringProperty(String name, String defaultValue, String description) Creates a configuration metadata definition for a string property.
-
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 propertydefaultValue- the default value of the property, can be empty but not nulldescription- 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 propertydefaultValue- the default value of the property, can be empty but not nulldescription- 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 propertydefaultValue- the default value of the propertydescription- 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 propertydefaultValue- the default value of the propertydescription- 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 propertydefaultValue- the default value of the property, set to null for an empty default valuedescription- 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 propertydefaultValue- the default value of the property, can be empty but not nulldescription- 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 propertydefaultValue- the default value of the property, can be empty but not nulldescription- the description of the property- Returns:
- a configuration metadata definition
-
setMin
- Parameters:
min- the defined minimum value, set to null to disable the constraint- Returns:
- this, to continue building
-
setMax
- Parameters:
max- the defined maximum value, set to null to disable the constraint- Returns:
- this, to continue building
-