Skip to content

Instantly share code, notes, and snippets.

@marianogonzalez
Created August 28, 2015 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marianogonzalez/69af1dfc71d54e94351a to your computer and use it in GitHub Desktop.
Save marianogonzalez/69af1dfc71d54e94351a to your computer and use it in GitHub Desktop.
/*
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.extension.validation.api;
/**
* The result of a validation
*
* @see Validator
* @since 3.7.0
*/
public interface ValidationResult
{
/**
* Returns a message associated with the execution
* of the validation. If the validation failed
* (which means that {@link #isError()} is {@code true}),
* then it will contain the reason why the error was generated.
* Otherwise, it might or might not contain some additional
* consideration about the validation result
*
* @return a {@link String} or {@code null}
*/
String getMessage();
/**
* Whether the validation has failed or not
*
* @return {code true} if the validation failed. {@code false} otherwise
*/
boolean isError();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment