Class FileValidator


  • public class FileValidator
    extends Validator
    This class performs the file related validations such as
      existence of the file read, write & execute permissions, whether the file is a directory or a file
    NOT THREAD SAFE
    • Constructor Detail

      • FileValidator

        public FileValidator​(String name,
                             String constraints)
        Constructs a new FileValidator object.
        Parameters:
        name - The name of the entity that will be validated. This name is used in the error message.
        constraints - The constaint set that will be checked for any given file during validation.
    • Method Detail

      • getConstraints

        public String getConstraints()
        Returns:
        Returns the current constraint set.
      • setConstraints

        public String setConstraints​(String constraints)
        Sets the current constraint set to the given set if it is a valid constriant set.