Interface Assessment<DOC extends Document>
-
- Type Parameters:
DOC- the type of document that is the target of the assessment
- All Known Subinterfaces:
ConditionalAssessment<DOC>,LogicAssessment<DOC>
- All Known Implementing Classes:
AbstractAssessment,AbstractLogicAssessment,AssessmentSequence,DefaultConditionalAssessment
public interface Assessment<DOC extends Document>This interface represents an assessment, a series of tests used to check the well-formedness and content-completeness of an XML document. Implementations of this interface must provide the assessment logic used to perform the assessment. The results of the assessment are provided using aAssessmentResultBuilderby adding a number ofTestResultinstances using theAssessmentResultBuilder.addTestResult(Assessment, Document, String, TestResult)method. TheAssessmentResultBuilderinstance is then capable of producing anAssessmentResultsobject via theAssessmentResultBuilder.build(gov.nist.secauto.decima.core.requirement.RequirementsManager)method once all required assessments have been performed.If an assessment needs to be conducted conditionally based on an XPath expression, then implementations should also implement the
ConditionalAssessmentfeature interface.Implementations of this interface are expected to be thread safe when the
execute(Document, AssessmentResultBuilder)method is invoked from different calling contexts.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecute(DOC document, AssessmentResultBuilder builder)Executes the assessment, which then generates input into aAssessmentResultsusing the providedAssessmentResultBuilder.StringgetAssessmentType()Returns a stable identifier indicating the type of assessment being performed.List<Assessment<DOC>>getExecutableAssessments(DOC document)StringgetName(boolean includeDetail)Retrieves a human-readable label for the assessment.
-
-
-
Method Detail
-
getAssessmentType
String getAssessmentType()
Returns a stable identifier indicating the type of assessment being performed.- Returns:
- an identifier
-
execute
void execute(DOC document, AssessmentResultBuilder builder) throws AssessmentException
Executes the assessment, which then generates input into aAssessmentResultsusing the providedAssessmentResultBuilder.- Parameters:
document- the XML document to assessbuilder- theAssessmentResultBuilderused to eventually generate aAssessmentResultsonce all assessments have been performed- Throws:
AssessmentException- if an error occurs while performing the assessment
-
getName
String getName(boolean includeDetail)
Retrieves a human-readable label for the assessment.- Parameters:
includeDetail- iftrue, include identifying details- Returns:
- a human-readable label for the assessment.
-
getExecutableAssessments
List<Assessment<DOC>> getExecutableAssessments(DOC document) throws AssessmentException
- Throws:
AssessmentException
-
-