Package formflow.library.file
Class ClammitVirusScanner
java.lang.Object
formflow.library.file.ClammitVirusScanner
- All Implemented Interfaces:
FileVirusScanner
@Service
@ConditionalOnProperty(name="form-flow.uploads.virus-scanning.enabled",
havingValue="true")
public class ClammitVirusScanner
extends Object
implements FileVirusScanner
Clammit Virus Scanner An implementation of the FileVirusScanner interface that will use the
Clammit Virus Scanner Server to check
files for viruses.
The Clammit Virus Scanner Server itself is set up independently of this code base.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvirusDetected(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.
-
Constructor Details
-
ClammitVirusScanner
public ClammitVirusScanner(@Value("${form-flow.uploads.virus-scanning.service-url}") String clammitUrl, @Value("${form-flow.uploads.virus-scanning.timeout:5000}") int timeout)
-
-
Method Details
-
virusDetected
Description copied from interface:FileVirusScannerThis 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:
virusDetectedin interfaceFileVirusScanner- Parameters:
file- file to check for virus in- Returns:
- true if virus is found, false otherwise
- Throws:
Exception
-