Class ModelValidationResultsImpl
- java.lang.Object
-
- org.camunda.bpm.model.xml.impl.validation.ModelValidationResultsImpl
-
- All Implemented Interfaces:
ValidationResults
public class ModelValidationResultsImpl extends Object implements ValidationResults
- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<ModelElementInstance,List<ValidationResult>>
collectedResults
protected int
errorCount
protected int
warningCount
-
Constructor Summary
Constructors Constructor Description ModelValidationResultsImpl(Map<ModelElementInstance,List<ValidationResult>> collectedResults, int errorCount, int warningCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getErrorCount()
Map<ModelElementInstance,List<ValidationResult>>
getResults()
int
getWarinigCount()
boolean
hasErrors()
void
write(StringWriter writer, ValidationResultFormatter formatter)
Utility method to print out a summary of the validation results.
-
-
-
Field Detail
-
collectedResults
protected Map<ModelElementInstance,List<ValidationResult>> collectedResults
-
errorCount
protected int errorCount
-
warningCount
protected int warningCount
-
-
Constructor Detail
-
ModelValidationResultsImpl
public ModelValidationResultsImpl(Map<ModelElementInstance,List<ValidationResult>> collectedResults, int errorCount, int warningCount)
-
-
Method Detail
-
hasErrors
public boolean hasErrors()
- Specified by:
hasErrors
in interfaceValidationResults
- Returns:
- true if there are
ValidationResult
of typeValidationResultType.ERROR
-
getErrorCount
public int getErrorCount()
- Specified by:
getErrorCount
in interfaceValidationResults
- Returns:
- the count of
ValidationResult
of typeValidationResultType.ERROR
-
getWarinigCount
public int getWarinigCount()
- Specified by:
getWarinigCount
in interfaceValidationResults
- Returns:
- the count of
ValidationResult
of typeValidationResultType.WARNING
-
write
public void write(StringWriter writer, ValidationResultFormatter formatter)
Description copied from interface:ValidationResults
Utility method to print out a summary of the validation results.- Specified by:
write
in interfaceValidationResults
- Parameters:
writer
- aStringWriter
to which the result should be printedformatter
- formatter for printing elements and validation results
-
getResults
public Map<ModelElementInstance,List<ValidationResult>> getResults()
- Specified by:
getResults
in interfaceValidationResults
- Returns:
- the individual results of the validation grouped by element.
-
-