Class ValidatorFactory
java.lang.Object
net.adoptopenjdk.icedteaweb.config.ValidatorFactory
Provides
ValueValidator implementations for some common value types- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueValidatorstatic ValueValidatorstatic ValueValidatorstatic ValueValidatorstatic ValueValidatorcreateMultipleStringValidator(String[] singleValues, String[] comboValues) Returns aValueValidatorthat checks if an object is a string from one of the provided single NumberOfArguments Strings or a combination from the provided combination Strings.static NotBlankValidatorstatic PortValidatorstatic ValueValidatorcreateRangedIntegerValidator(int low, int high) Returns aValueValidatorthat checks if an object represents a valid integer (it is a Integer or Long or a String representation of one), within the given range.static ValueValidatorstatic ValueValidatorcreateStringValidator(String[] validValues) Returns aValueValidatorthat checks if an object is a string from one of the provided Strings.static ValueValidator
-
Constructor Details
-
ValidatorFactory
public ValidatorFactory()
-
-
Method Details
-
createBooleanValidator
- Returns:
- a
ValueValidatorthat can be used to check if an object is a valid Boolean
-
createFilePathValidator
- Returns:
- a
ValueValidatorthat can be used to check if an object is a String containing a valid file path or not
-
createBrowserPathValidator
-
createRangedIntegerValidator
Returns aValueValidatorthat checks if an object represents a valid integer (it is a Integer or Long or a String representation of one), within the given range. The values are inclusive.- Parameters:
low- the lowest valid valuehigh- the highest valid value- Returns:
- value validator for given range
-
createStringValidator
Returns aValueValidatorthat checks if an object is a string from one of the provided Strings.- Parameters:
validValues- an array of Strings which are considered valid- Returns:
- validator for given strings
-
createMultipleStringValidator
public static ValueValidator createMultipleStringValidator(String[] singleValues, String[] comboValues) Returns aValueValidatorthat checks if an object is a string from one of the provided single NumberOfArguments Strings or a combination from the provided combination Strings.- Parameters:
singleValues- an array of Strings which are considered valid only by themselvescomboValues- an array of Strings which are considered valid in any combination with themselves- Returns:
- validator forgiven strings
-
createManifestAttributeCheckValidator
- Returns:
- a
ValueValidatorthat checks if an object is a string from the possible single or combination ManifestAttributeCheck values
-
createUrlValidator
- Returns:
- a
ValueValidatorthat checks if an object represents a valid url
-
createPortValidator
- Returns:
- a
PortValidatorthat checks if a port is null or within a valid port range
-
createRustCpValidator
-
createNotBlankValidator
- Returns:
- a
NotBlankValidatorthat checks if a value is not null or blank.
-