From 6fa8ab3f70322e0d820ee2f83a9a24702e49cbb4 Mon Sep 17 00:00:00 2001 From: Joonas Lehtinen Date: Tue, 13 May 2008 11:39:53 +0000 Subject: [PATCH] alidator.Suggestive API was created in year 2002 to be able to create validators that propose corrections for invalid values. During the years this idea has prooved itself to be inpractical - (almost certainly) no-one has ever used this API. As you say - even the base framework (AbstractField) does not support it. We can make exception for backwards compatibility changes rule in this case and just drop the API as it (almost certainly) would not affect anyone. svn changeset:4449/svn branch:trunk --- src/com/itmill/toolkit/data/Validator.java | 26 ---------------------- 1 file changed, 26 deletions(-) diff --git a/src/com/itmill/toolkit/data/Validator.java b/src/com/itmill/toolkit/data/Validator.java index 35cd14a39c..fbdbef78cf 100644 --- a/src/com/itmill/toolkit/data/Validator.java +++ b/src/com/itmill/toolkit/data/Validator.java @@ -45,32 +45,6 @@ public interface Validator { */ public boolean isValid(Object value); - /** - * Adds the proposing functionality to a {@link Validator}. A - * Suggestive validator can propose a valid value for the - * object it is attached to validate. This way the {@link Validatable} - * object may avoid situations where it contains a value that could lead to - * a error. - * - * @author IT Mill Ltd. - * @version - * @VERSION@ - * @since 3.0 - */ - public interface Suggestive extends Validator { - - /** - * Suggests another value that can be used instead of the proposedValue - * if it is invalid. If it is valid in the opinion of this validator, - * however, it is returned as is. - * - * @param proposedValue - * Originally proposed value that could be invalid. - * @return Suggested value that's not invalid against this validator - */ - public Object suggestValidValue(Object proposedValue); - } - /** * Invalid value exception can be thrown by {@link Validator} when a given * value is not valid. -- 2.39.5