Package org.ametys.web
Class AnalyseFileForVirusHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.AnalyseFileForVirusHelper
- All Implemented Interfaces:
LogEnabled
,Component
Helper that analyses a file for viruses
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
analysefile
(String absolutePath) Antivirus analysis.boolean
Checks if the antivirus is enabledMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The component role. -
ANTIVIRUS_RESULT_OK
The result of the antivirus when no viruses is found- See Also:
-
-
Constructor Details
-
AnalyseFileForVirusHelper
public AnalyseFileForVirusHelper()
-
-
Method Details
-
isAntivirusEnabled
Checks if the antivirus is enabled- Returns:
true
if the antivirus is enabled,false
otherwise
-
analysefile
Antivirus analysis. Based on clamscan results.- Parameters:
absolutePath
- the absolute path of the file to analyse- Returns:
- true if the file is correct, false if a malware was discovered in the file
-