-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
337 additions
and
593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 21 additions & 1 deletion
22
src/main/java/org/entur/netex/validation/validator/ValidationReportEntryFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
package org.entur.netex.validation.validator; | ||
|
||
/** | ||
* Create validation entries based on the rule execution result (code and message) and the configuration file (name and severity) | ||
* Factory for validation report entries. | ||
* Concrete implementation may override the default configuration provided by the validation rule. | ||
*/ | ||
public interface ValidationReportEntryFactory { | ||
/** | ||
* Create a validation report entry for a validation issue. | ||
* Concrete implementations may override the default configuration provided by the validation rule. | ||
*/ | ||
ValidationReportEntry createValidationReportEntry( | ||
ValidationIssue validationIssue | ||
); | ||
|
||
/** | ||
* Create a template validation report entry for a validation rule, for documentation purpose. | ||
* The data location is empty and the message placeholders are not resolved. | ||
* Concrete implementations may override the default configuration provided by the validation rule. | ||
*/ | ||
default ValidationReportEntry templateValidationReportEntry( | ||
ValidationRule validationRule | ||
) { | ||
return new ValidationReportEntry( | ||
validationRule.message(), | ||
validationRule.name(), | ||
validationRule.severity() | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.