org.springmodules.validation.bean.converter
Interface ErrorCodeConverter

All Known Implementing Classes:
KeepAsIsErrorCodeConverter, ModelAwareErrorCodeConverter

public interface ErrorCodeConverter

A strategy to convert one error code to another.

Author:
Uri Boness

Method Summary
 String convertGlobalErrorCode(String errorCode, Class clazz)
          Converts the given global error code associated with the given class to another error code.
 String convertPropertyErrorCode(String errorCode, Class clazz, String propertyName)
          Converts the given property error code that is associated with the given class and property to another error code.
 

Method Detail

convertGlobalErrorCode

String convertGlobalErrorCode(String errorCode,
                              Class clazz)
Converts the given global error code associated with the given class to another error code.

Parameters:
errorCode - The global error code to convert.
clazz - The class that the given error code is associated with.
Returns:
The converted error code.

convertPropertyErrorCode

String convertPropertyErrorCode(String errorCode,
                                Class clazz,
                                String propertyName)
Converts the given property error code that is associated with the given class and property to another error code.

Parameters:
errorCode - The property error code to convert.
clazz - The class that is associated with the given error code.
propertyName - The property that is associated with the given error code.
Returns:
The converted error code.


Copyright © 2009. All Rights Reserved.