Class NoOpVirusScanner

java.lang.Object
formflow.library.file.NoOpVirusScanner
All Implemented Interfaces:
FileVirusScanner

@Service @ConditionalOnProperty(name="form-flow.uploads.virus-scanning.enabled", havingValue="false", matchIfMissing=true) public class NoOpVirusScanner extends Object implements FileVirusScanner
This implementation of FileVirusScanner does nothing useful at all. It logs the methods being called.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    virusDetected(org.springframework.web.multipart.MultipartFile file)
    This method will send the passed in `file` to a virus scanner service defined in the implementation and return a boolean value indicating if the file contains a virus.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NoOpVirusScanner

      public NoOpVirusScanner()
  • Method Details

    • virusDetected

      public boolean virusDetected(org.springframework.web.multipart.MultipartFile file)
      Description copied from interface: FileVirusScanner
      This method will send the passed in `file` to a virus scanner service defined in the implementation and return a boolean value indicating if the file contains a virus.
      Specified by:
      virusDetected in interface FileVirusScanner
      Parameters:
      file - file to check for virus in
      Returns:
      true if virus is found, false otherwise