Last active
December 18, 2019 21:27
-
-
Save CuriousVini/3a9da8fd75545a7d616ab836df45acfd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public interface FailureCollector { | |
| /** | |
| * Add a validation failure to this failure collector. The method returns the validation failure that was added to | |
| * the failure collector. This failure can be used to add additional {@link ValidationFailure.Cause}s. | |
| * For example, | |
| * <code>failureCollector.addFailure("message", "action").withConfigProperty("configProperty");</code> | |
| * | |
| * @param message failure message | |
| * @param correctiveAction corrective action | |
| * @return a validation failure | |
| * @throws UnsupportedOperationException if the implementation does not override this method | |
| */ | |
| default ValidationFailure addFailure(String message, @Nullable String correctiveAction) { | |
| throw new UnsupportedOperationException("Adding a failure is not supported."); | |
| } | |
| /** | |
| * Get list of validation failures. | |
| * | |
| * @return list of validation failures | |
| */ | |
| default List<ValidationFailure> getValidationFailures() { | |
| throw new UnsupportedOperationException("Getting failures is not supported."); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment