Class ModelValidationResultsImpl
java.lang.Object
org.camunda.bpm.model.xml.impl.validation.ModelValidationResultsImpl
- All Implemented Interfaces:
ValidationResults
- Author:
- Daniel Meyer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<ModelElementInstance,List<ValidationResult>> protected intprotected int -
Constructor Summary
ConstructorsConstructorDescriptionModelValidationResultsImpl(Map<ModelElementInstance, List<ValidationResult>> collectedResults, int errorCount, int warningCount) ModelValidationResultsImpl(ValidationResults... validationResults) -
Method Summary
Modifier and TypeMethodDescriptionintintbooleanvoidwrite(StringWriter writer, ValidationResultFormatter formatter) Utility method to print out a summary of the validation results.voidwrite(StringWriter writer, ValidationResultFormatter formatter, int maxSize) Utility method to print out a summary of the validation results.
-
Field Details
-
collectedResults
-
errorCount
protected int errorCount -
warningCount
protected int warningCount
-
-
Constructor Details
-
ModelValidationResultsImpl
public ModelValidationResultsImpl(Map<ModelElementInstance, List<ValidationResult>> collectedResults, int errorCount, int warningCount) -
ModelValidationResultsImpl
-
-
Method Details
-
hasErrors
public boolean hasErrors()- Specified by:
hasErrorsin interfaceValidationResults- Returns:
- true if there are
ValidationResultof typeValidationResultType.ERROR
-
getErrorCount
public int getErrorCount()- Specified by:
getErrorCountin interfaceValidationResults- Returns:
- the count of
ValidationResultof typeValidationResultType.ERROR
-
getWarinigCount
public int getWarinigCount()- Specified by:
getWarinigCountin interfaceValidationResults- Returns:
- the count of
ValidationResultof typeValidationResultType.WARNING
-
write
Description copied from interface:ValidationResultsUtility method to print out a summary of the validation results.- Specified by:
writein interfaceValidationResults- Parameters:
writer- aStringWriterto which the result should be printedformatter- formatter for printing elements and validation results
-
write
Description copied from interface:ValidationResultsUtility method to print out a summary of the validation results.- Specified by:
writein interfaceValidationResults- Parameters:
writer- aStringWriterto which the result should be printedformatter- formatter for printing elements and validation resultsmaxSize- the maximum size (in bytes) that is allowed to be written to the writer
-
getResults
- Specified by:
getResultsin interfaceValidationResults- Returns:
- the individual results of the validation grouped by element.
-