Package de.xima.fc.security.malware
Class MalwareScanReport
- java.lang.Object
-
- de.xima.fc.security.malware.MalwareScanReport
-
- All Implemented Interfaces:
Serializable
public final class MalwareScanReport extends Object implements Serializable
Represents the result of a malware scan.- Since:
- 7.0.13
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MalwareScanReport(EMalwareScanOutcome outcome, String detailedScanReport, Throwable error)Creates a new malware scan report with the given data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDetailedScanReport()Optional<Throwable>getError()EMalwareScanOutcomegetOutcome()booleanisSafe()Returnsfalseif the file or data might be malware infected and should be considered unsafe.booleanisUnsafe()Returnstrueif the file or data might be malware infected and must be considered unsafe.
-
-
-
Constructor Detail
-
MalwareScanReport
public MalwareScanReport(EMalwareScanOutcome outcome, String detailedScanReport, Throwable error)
Creates a new malware scan report with the given data.- Parameters:
outcome- The type of the malware scan result, seegetOutcome().detailedScanReport- Detailed scan report or message, seegetDetailedScanReport().error- Error that occurred during scanning, if any. See alsogetError().
-
-
Method Detail
-
getDetailedScanReport
public String getDetailedScanReport()
- Returns:
- A detailed report of the malware scan, such as the command line output or log messages of the malware scanner.
-
getError
public Optional<Throwable> getError()
- Returns:
- The error that occurred during the malware scan, if any. An error is usually present when the
outcomeisSCAN_FAILURE.
-
getOutcome
public EMalwareScanOutcome getOutcome()
- Returns:
- The outcome
-
isSafe
public boolean isSafe()
Returnsfalseif the file or data might be malware infected and should be considered unsafe. This may happen either when a malware scanner found a malware signature, or when the malware scan failed due to an unhandled error. Returnstruewhen the file or data was scanned successfully and no malware could be detected despite best efforts.trueis also returned when no malware scanner is available on the system.- Returns:
trueif the file or data is safe and no malware was found,falseotherwise.
-
isUnsafe
public boolean isUnsafe()
Returnstrueif the file or data might be malware infected and must be considered unsafe. Unsafe data must not be processed any further and should be discarded. This may happen either when a malware scanner found a malware signature, or when the malware scan failed due to an unhandled error. Returnsfalsewhen the file or data was scanned successfully and no malware could be detected despite best efforts.falseis also returned when no malware scanner is available on the system.- Returns:
trueif the file or data is unsafe and may contain malware,falseotherwise.
-
-