Class WorkContextDelegate
java.lang.Object
com.redhat.parodos.patterndetection.context.WorkContextDelegate
Contains helper methods for working with the data in the WorkContext.
- Author:
- Luke Shannon (Github: lshannon)
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanareAllPatternsDetected(WorkReport report) Compares the DETECT_PATTERNS to the DESIRED_PATTERNS to see if all were detectedgetDesiredPatterns(WorkContext context) getDetectedClue(WorkContext context) getDetectedClue(WorkReport report) getDetectedPatterns(WorkContext context) getDetectedPatterns(WorkReport report) getFilesToScan(WorkContext context) getFoldersToScan(WorkContext context) booleanisThisClueDetected(Clue clue, WorkContext context) Checks if a specific Clue is detectedbooleanisThisClueDetected(Clue clue, WorkReport report) Checks if a specific Clue is detectedbooleanisThisPatternDetected(Pattern pattern, WorkReport report) voidmarkClueAsDetected(Clue clue, File file, WorkContext context) Updates the WorkContext DETECTED_CLUE collection with this cluevoidprocessResultsAfterScan(WorkContext context) This checks all the DESIRED_PATTERNS and compares them to the detected CLUE(S) to see if any of the DESIRED_PATTERNS could become DETECTED_PATTERNSbooleanvalidateAndIntializeContext(WorkContext context) Checks if the WorkContext has everything to perform the Detection: - START_DIRECTORY : the root location to begin processing the files - START_FILE : the root java.util.File to begin processing the files
-
Constructor Details
-
WorkContextDelegate
public WorkContextDelegate()
-
-
Method Details
-
validateAndIntializeContext
Checks if the WorkContext has everything to perform the Detection: - START_DIRECTORY : the root location to begin processing the files - START_FILE : the root java.util.File to begin processing the files- Parameters:
context- easy-flow WorkContext- Returns:
- true if everything, false if required parameter is missing
-
areAllPatternsDetected
Compares the DETECT_PATTERNS to the DESIRED_PATTERNS to see if all were detected- Parameters:
report- WorkReport passed in at the start of the Scan- Returns:
- true is all Patterns were detect, false is not all the Patterns were detected
-
getFilesToScan
-
getDetectedClue
-
getDetectedClue
-
getDesiredPatterns
-
getDetectedPatterns
-
getDetectedPatterns
-
getFoldersToScan
-
isThisPatternDetected
-
isThisClueDetected
Checks if a specific Clue is detected- Parameters:
clue- Clue to check if it was detectedcontext- WorkContext used through out the Scan- Returns:
- true if the Clue was detected, false if it was not
-
isThisClueDetected
Checks if a specific Clue is detected- Parameters:
clue- Clue to check if it was detectedcontext- WorkContext used through out the Scan- Returns:
- true if the Clue was detected, false if it was not
-
markClueAsDetected
Updates the WorkContext DETECTED_CLUE collection with this clue- Parameters:
clue- Clue that has been detectedfile- File that triggered the detectioncontext- WorkContext used during the Scan
-
processResultsAfterScan
This checks all the DESIRED_PATTERNS and compares them to the detected CLUE(S) to see if any of the DESIRED_PATTERNS could become DETECTED_PATTERNS- Parameters:
context- WorkContext used during the Scan
-