Class ValidatorFactory

    • Constructor Detail

      • ValidatorFactory

        public ValidatorFactory()
    • Method Detail

      • createBooleanValidator

        public static ValueValidator createBooleanValidator()
        Returns:
        a ValueValidator that can be used to check if an object is a valid Boolean
      • createFilePathValidator

        public static ValueValidator createFilePathValidator()
        Returns:
        a ValueValidator that can be used to check if an object is a String containing a valid file path or not
      • createBrowserPathValidator

        public static ValueValidator createBrowserPathValidator()
      • createRangedIntegerValidator

        public static ValueValidator createRangedIntegerValidator​(int low,
                                                                  int high)
        Returns a ValueValidator that 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 value
        high - the highest valid value
        Returns:
        value validator for given range
      • createStringValidator

        public static ValueValidator createStringValidator​(java.lang.String[] validValues)
        Returns a ValueValidator that 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​(java.lang.String[] singleValues,
                                                                   java.lang.String[] comboValues)
        Returns a ValueValidator that 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 themselves
        comboValues - an array of Strings which are considered valid in any combination with themselves
        Returns:
        validator forgiven strings
      • createManifestAttributeCheckValidator

        public static ValueValidator createManifestAttributeCheckValidator()
        Returns:
        a ValueValidator that checks if an object is a string from the possible single or combination ManifestAttributeCheck values
      • createUrlValidator

        public static ValueValidator createUrlValidator()
        Returns:
        a ValueValidator that checks if an object represents a valid url
      • createPortValidator

        public static PortValidator createPortValidator()
        Returns:
        a PortValidator that checks if a port is null or within a valid port range
      • createRustCpValidator

        public static ValueValidator createRustCpValidator()