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 newTestResultis 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 evaluatedTestStatefor a derived requirement is directly reported.AssessmentStatsgetAssessmentStats(Assessment<?> assessment)protected gov.nist.secauto.decima.core.assessment.util.AssessmentSummarizingLoggingHandler.AssessmentStatsImplgetAssessmentStatsInternal(Assessment<?> assessment)org.apache.logging.log4j.LevelgetSummaryLogLevel()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:LoggingHandlerSignals that evaluation of the target assessment started.- Specified by:
assessmentStartedin interfaceLoggingHandler- Overrides:
assessmentStartedin 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:LoggingHandlerSignals that evaluation of the target assessment resulted in an error.- Specified by:
assessmentErrorin interfaceLoggingHandler- Overrides:
assessmentErrorin 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, ornullif 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:LoggingHandlerCalled when a newTestResultis reported against the identified derived requirement.- Specified by:
addTestResultin interfaceLoggingHandler- Overrides:
addTestResultin 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:LoggingHandlerCalled when the evaluatedTestStatefor a derived requirement is directly reported.- Specified by:
assignTestStatusin interfaceLoggingHandler- Overrides:
assignTestStatusin 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:LoggingHandlerSignals that evaluation of the target assessment completed successfully.- Specified by:
assessmentCompletedin interfaceLoggingHandler- Overrides:
assessmentCompletedin 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)
-
-