Class FileValidationsBuilder

java.lang.Object
com.shaft.validation.FileValidationsBuilder

public class FileValidationsBuilder extends Object
  • Constructor Details

    • FileValidationsBuilder

      public FileValidationsBuilder(com.shaft.validation.ValidationEnums.ValidationCategory validationCategory, String folderRelativePath, String fileName, StringBuilder reportMessageBuilder)
  • Method Details

    • exists

      public ValidationsExecutor exists()
      Use this to check if a certain file exists
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • doesNotExist

      public ValidationsExecutor doesNotExist()
      Use this to check if a certain file does not exist
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • checksum

      public NativeValidationsBuilder checksum()
      Use this to calculate and check a certain file checksum to confirm if it has the exact same content or not
      Returns:
      a NativeValidationsBuilder object to continue building your validation
    • content

      public NativeValidationsBuilder content()
      Use this to attempt to read and validate a certain file content (works for PDF and TEXT files)
      Returns:
      a NativeValidationsBuilder object to continue building your validation