Class ModelValidationResultsImpl
- java.lang.Object
-
- org.camunda.bpm.model.xml.impl.validation.ModelValidationResultsImpl
-
- All Implemented Interfaces:
ValidationResults
public class ModelValidationResultsImpl extends java.lang.Object implements ValidationResults
- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<ModelElementInstance,java.util.List<ValidationResult>>
collectedResults
protected int
errorCount
protected int
warningCount
-
Constructor Summary
Constructors Constructor Description ModelValidationResultsImpl(java.util.Map<ModelElementInstance,java.util.List<ValidationResult>> collectedResults, int errorCount, int warningCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getErrorCount()
java.util.Map<ModelElementInstance,java.util.List<ValidationResult>>
getResults()
int
getWarinigCount()
boolean
hasErrors()
void
write(java.io.StringWriter writer, ValidationResultFormatter formatter)
Utility method to print out a summary of the validation results.
-
-
-
Field Detail
-
collectedResults
protected java.util.Map<ModelElementInstance,java.util.List<ValidationResult>> collectedResults
-
errorCount
protected int errorCount
-
warningCount
protected int warningCount
-
-
Constructor Detail
-
ModelValidationResultsImpl
public ModelValidationResultsImpl(java.util.Map<ModelElementInstance,java.util.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(java.io.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 java.util.Map<ModelElementInstance,java.util.List<ValidationResult>> getResults()
- Specified by:
getResults
in interfaceValidationResults
- Returns:
- the individual results of the validation grouped by element.
-
-