From 9be2a248905a205dd39e1267f39a97c551d0d2c6 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Fri, 27 Feb 2009 22:17:20 +0000 Subject: [PATCH] polish --- ...lidationFailureMessageResolverFactory.java | 15 +++++++++++ .../binding/validation/ValidationFailure.java | 15 +++++++++++ ...lidationFailureMessageResolverFactory.java | 27 ++++++++++++++----- .../ValidationFailureModelContext.java | 15 +++++++++++ 4 files changed, 66 insertions(+), 6 deletions(-) diff --git a/spring-binding/src/main/java/org/springframework/binding/validation/DefaultValidationFailureMessageResolverFactory.java b/spring-binding/src/main/java/org/springframework/binding/validation/DefaultValidationFailureMessageResolverFactory.java index 16498176..d28cf6a5 100644 --- a/spring-binding/src/main/java/org/springframework/binding/validation/DefaultValidationFailureMessageResolverFactory.java +++ b/spring-binding/src/main/java/org/springframework/binding/validation/DefaultValidationFailureMessageResolverFactory.java @@ -1,3 +1,18 @@ +/* + * Copyright 2008 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.binding.validation; import java.util.HashMap; diff --git a/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailure.java b/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailure.java index c41d5154..7229b2ce 100644 --- a/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailure.java +++ b/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailure.java @@ -1,3 +1,18 @@ +/* + * Copyright 2008 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.binding.validation; import java.util.Map; diff --git a/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailureMessageResolverFactory.java b/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailureMessageResolverFactory.java index b7f11b99..0c577fce 100644 --- a/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailureMessageResolverFactory.java +++ b/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailureMessageResolverFactory.java @@ -1,3 +1,18 @@ +/* + * Copyright 2008 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.binding.validation; import org.springframework.binding.message.Message; @@ -5,18 +20,18 @@ import org.springframework.binding.message.MessageContext; import org.springframework.binding.message.MessageResolver; /** - * Translates a validation failure into a message resolver that can be used to add a {@link Message} to a - * {@link MessageContext} . + * Translates a ValidationFailure into a MessageResolver that can be used to add a localized failure {@link Message} to + * a {@link MessageContext} . * * @author Keith Donald */ public interface ValidationFailureMessageResolverFactory { /** - * Creates a new message resolver for the validation failure. - * @param failure a validation failure reported by the validator - * @param modelContext additional information about the model object that failed to validate - * @return the resolver of the failure message + * Creates a new MessageResolver that can resolve the failure {@link Message} for the reported ValidationFailure. + * @param failure a validation failure reported by a validator + * @param modelContext additional information about the model that failed to validate + * @return the failure message resolver */ public MessageResolver createMessageResolver(ValidationFailure failure, ValidationFailureModelContext modelContext); diff --git a/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailureModelContext.java b/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailureModelContext.java index d001760e..bf2ef190 100644 --- a/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailureModelContext.java +++ b/spring-binding/src/main/java/org/springframework/binding/validation/ValidationFailureModelContext.java @@ -1,3 +1,18 @@ +/* + * Copyright 2008 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.binding.validation; /**