Package ai.nightfall.scan.model
Class DetectionRule
java.lang.Object
ai.nightfall.scan.model.DetectionRule
An object that contains a set of detectors to be used when scanning content. Findings matches are
triggered according to the provided
logicalOplogicalOp; valid values are ANY (logical
OR, i.e. a finding is emitted only if any of the provided detectors match), or ALL
(logical AND, i.e. a finding is emitted only if all provided detectors match).-
Constructor Summary
ConstructorsConstructorDescriptionDetectionRule(List<Detector> detectors, LogicalOp logicalOp) Create a detection rule with the provided detectors and logicalOp.DetectionRule(List<Detector> detectors, LogicalOp logicalOp, String name) Create a detection rule with the provided detectors and logicalOp. -
Method Summary
Modifier and TypeMethodDescriptionGet the list of detectors.Get the logical op.getName()Get the name of the detection rule.voidsetDetectors(List<Detector> detectors) Set the detectors.voidsetLogicalOp(LogicalOp logicalOp) Set the logical op.voidSet the detection rule name.toString()
-
Constructor Details
-
DetectionRule
Create a detection rule with the provided detectors and logicalOp.- Parameters:
detectors- a list of detectorslogicalOp- a logical op: ANY or ALL
-
DetectionRule
Create a detection rule with the provided detectors and logicalOp.- Parameters:
detectors- a list of detectorslogicalOp- a logical op: ANY or ALLname- a name for the detection rule
-
-
Method Details
-
getDetectors
Get the list of detectors.- Returns:
- the set of detectors
-
setDetectors
Set the detectors.- Parameters:
detectors- a set of detectors
-
getLogicalOp
Get the logical op.- Returns:
- the logical op
-
setLogicalOp
Set the logical op.- Parameters:
logicalOp- a logical op; valid valuesANYorALL
-
getName
Get the name of the detection rule.- Returns:
- the name of the detection rule
-
setName
Set the detection rule name.- Parameters:
name- a name for the detection rule
-
toString
-