This commit is contained in:
Keith Donald
2009-02-27 22:17:20 +00:00
parent f2931626f0
commit 9be2a24890
4 changed files with 66 additions and 6 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;
/**