Class ModelValidationResultsImpl
java.lang.Object
org.camunda.bpm.model.xml.impl.validation.ModelValidationResultsImpl
- All Implemented Interfaces:
ValidationResults
- Author:
- Daniel Meyer
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<ModelElementInstance,
List<ValidationResult>> protected int
protected int
-
Constructor Summary
ConstructorDescriptionModelValidationResultsImpl
(Map<ModelElementInstance, List<ValidationResult>> collectedResults, int errorCount, int warningCount) ModelValidationResultsImpl
(ValidationResults... validationResults) -
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
void
write
(StringWriter writer, ValidationResultFormatter formatter) Utility method to print out a summary of the validation results.void
write
(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:
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
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
-
write
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 resultsmaxSize
- the maximum size (in bytes) that is allowed to be written to the writer
-
getResults
- Specified by:
getResults
in interfaceValidationResults
- Returns:
- the individual results of the validation grouped by element.
-