Class AssessmentSummarizingLoggingHandler
- java.lang.Object
-
- gov.nist.secauto.decima.core.assessment.util.AbstractDelegatingLoggingHandler
-
- gov.nist.secauto.decima.core.assessment.util.AssessmentSummarizingLoggingHandler
-
- All Implemented Interfaces:
LoggingHandler
public class AssessmentSummarizingLoggingHandler extends AbstractDelegatingLoggingHandler
-
-
Constructor Summary
Constructors Constructor Description AssessmentSummarizingLoggingHandler(org.apache.logging.log4j.Level summaryLogLevel)
AssessmentSummarizingLoggingHandler(org.apache.logging.log4j.Level summaryLogLevel, LoggingHandler delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <DOC extends Document>
voidaddTestResult(Assessment<? extends DOC> assessment, DOC document, String derivedRequirementId, TestResult result)
Called when a newTestResult
is reported against the identified derived requirement.<DOC extends Document>
voidassessmentCompleted(Assessment<? extends DOC> assessment, DOC document)
Signals that evaluation of the target assessment completed successfully.<DOC extends Document>
voidassessmentError(Assessment<? extends DOC> assessment, DOC document, Throwable th)
Signals that evaluation of the target assessment resulted in an error.<DOC extends Document>
voidassessmentStarted(Assessment<? extends DOC> assessment, DOC document)
Signals that evaluation of the target assessment started.<DOC extends Document>
voidassignTestStatus(Assessment<? extends DOC> assessment, DOC document, String derivedRequirementId, TestState state)
Called when the evaluatedTestState
for a derived requirement is directly reported.AssessmentStats
getAssessmentStats(Assessment<?> assessment)
protected gov.nist.secauto.decima.core.assessment.util.AssessmentSummarizingLoggingHandler.AssessmentStatsImpl
getAssessmentStatsInternal(Assessment<?> assessment)
org.apache.logging.log4j.Level
getSummaryLogLevel()
Retrieve the logging level to use when logging.protected <DOC extends Document>
booleanisProvideSummary(Assessment<? extends DOC> assessment, DOC document)
-
Methods inherited from class gov.nist.secauto.decima.core.assessment.util.AbstractDelegatingLoggingHandler
assessmentExecutionCompleted, assessmentExecutionStarted, completedResults, producingResults, validationEnded, validationStarted
-
-
-
-
Constructor Detail
-
AssessmentSummarizingLoggingHandler
public AssessmentSummarizingLoggingHandler(org.apache.logging.log4j.Level summaryLogLevel)
-
AssessmentSummarizingLoggingHandler
public AssessmentSummarizingLoggingHandler(org.apache.logging.log4j.Level summaryLogLevel, LoggingHandler delegate)
-
-
Method Detail
-
getSummaryLogLevel
public org.apache.logging.log4j.Level getSummaryLogLevel()
Retrieve the logging level to use when logging.- Returns:
- the summaryLogLevel
-
assessmentStarted
public <DOC extends Document> void assessmentStarted(Assessment<? extends DOC> assessment, DOC document)
Description copied from interface:LoggingHandler
Signals that evaluation of the target assessment started.- Specified by:
assessmentStarted
in interfaceLoggingHandler
- Overrides:
assessmentStarted
in classAbstractDelegatingLoggingHandler
- Type Parameters:
DOC
- the type of document that is the target of the assessment- Parameters:
assessment
- the target assessmentdocument
- the document being assessed
-
assessmentError
public <DOC extends Document> void assessmentError(Assessment<? extends DOC> assessment, DOC document, Throwable th)
Description copied from interface:LoggingHandler
Signals that evaluation of the target assessment resulted in an error.- Specified by:
assessmentError
in interfaceLoggingHandler
- Overrides:
assessmentError
in classAbstractDelegatingLoggingHandler
- Type Parameters:
DOC
- the type of document that is the target of the assessment- Parameters:
assessment
- the target assessmentdocument
- the document being assessedth
- the error that was thrown, ornull
if no exception was thrown
-
addTestResult
public <DOC extends Document> void addTestResult(Assessment<? extends DOC> assessment, DOC document, String derivedRequirementId, TestResult result)
Description copied from interface:LoggingHandler
Called when a newTestResult
is reported against the identified derived requirement.- Specified by:
addTestResult
in interfaceLoggingHandler
- Overrides:
addTestResult
in classAbstractDelegatingLoggingHandler
- Type Parameters:
DOC
- the type of document that is the target of the assessment- Parameters:
assessment
- the target assessmentdocument
- the document being assessedderivedRequirementId
- the derived requirement the result is forresult
- the reported result
-
assignTestStatus
public <DOC extends Document> void assignTestStatus(Assessment<? extends DOC> assessment, DOC document, String derivedRequirementId, TestState state)
Description copied from interface:LoggingHandler
Called when the evaluatedTestState
for a derived requirement is directly reported.- Specified by:
assignTestStatus
in interfaceLoggingHandler
- Overrides:
assignTestStatus
in classAbstractDelegatingLoggingHandler
- Type Parameters:
DOC
- the type of document that is the target of the assessment- Parameters:
assessment
- the target assessmentdocument
- the document being assessedderivedRequirementId
- the derived requirement for which the state change has occurredstate
- the new state of the derived requirement
-
assessmentCompleted
public <DOC extends Document> void assessmentCompleted(Assessment<? extends DOC> assessment, DOC document)
Description copied from interface:LoggingHandler
Signals that evaluation of the target assessment completed successfully.- Specified by:
assessmentCompleted
in interfaceLoggingHandler
- Overrides:
assessmentCompleted
in classAbstractDelegatingLoggingHandler
- Type Parameters:
DOC
- the type of document that is the target of the assessment- Parameters:
assessment
- the target assessmentdocument
- the document being assessed
-
isProvideSummary
protected <DOC extends Document> boolean isProvideSummary(Assessment<? extends DOC> assessment, DOC document)
-
getAssessmentStats
public AssessmentStats getAssessmentStats(Assessment<?> assessment)
-
getAssessmentStatsInternal
protected gov.nist.secauto.decima.core.assessment.util.AssessmentSummarizingLoggingHandler.AssessmentStatsImpl getAssessmentStatsInternal(Assessment<?> assessment)
-
-