All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.valkyriercp.binding.validation.ValidationResults Maven / Gradle / Ivy

There is a newer version: 1.3
Show newest version
package org.valkyriercp.binding.validation;

import org.valkyriercp.core.Severity;

import java.util.Set;

/**
 * Interface to be implemented by objects that hold a list of validation results
 * for a specific object.
 *
 * @author Oliver Hutchison
 * @see org.springframework.binding.validation.support.DefaultValidationResults
 */
public interface ValidationResults {

	/**
	 * Returns true of there are any validation messages of
	 * Severity.ERROR.
	 */
	boolean getHasErrors();

	/**
	 * Returns true of there are any validation messages of
	 * Severity.WARNING.
	 */
	boolean getHasWarnings();

	/**
	 * Returns true of there are any validation messages of
	 * Severity.INFO.
	 */
	boolean getHasInfo();

	/**
	 * Returns the total number of validation messages.
	 */
	int getMessageCount();

	/**
	 * Returns the total number of validation messages of the specified
	 * Severity.
	 */
	int getMessageCount(Severity severity);

	/**
	 * Returns the total number of validation messages that apply to the
	 * specified property name.
	 */
	int getMessageCount(String propertyName);

	/**
	 * Returns a set holding all of the validation messages.
	 */
	Set getMessages();

	/**
	 * Returns a set holding all of the validation messages of the specified
	 * Severity.
	 */
	Set getMessages(Severity severity);

	/**
	 * Returns a set holding all of the validation messages that apply to the
	 * specified property name.
	 */
	Set getMessages(String propertyName);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy