org.springmodules.validation.bean.converter
Class KeepAsIsErrorCodeConverter

java.lang.Object
  extended by org.springmodules.validation.bean.converter.KeepAsIsErrorCodeConverter
All Implemented Interfaces:
ErrorCodeConverter

public class KeepAsIsErrorCodeConverter
extends Object
implements ErrorCodeConverter

A simple implementation of ErrorCodeConverter that doesn't do any conversion and returns the passed-in error code.

Author:
Uri Boness

Constructor Summary
KeepAsIsErrorCodeConverter()
           
 
Method Summary
 String convertGlobalErrorCode(String errorCode, Class clazz)
          Returns the passed in error code.
 String convertPropertyErrorCode(String errorCode, Class clazz, String propertyName)
          Returns the passed in error code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeepAsIsErrorCodeConverter

public KeepAsIsErrorCodeConverter()
Method Detail

convertGlobalErrorCode

public String convertGlobalErrorCode(String errorCode,
                                     Class clazz)
Returns the passed in error code.

Specified by:
convertGlobalErrorCode in interface ErrorCodeConverter
Parameters:
errorCode - The global error code to convert.
clazz - The class that the given error code is associated with.
Returns:
The converted error code.
See Also:
ErrorCodeConverter.convertGlobalErrorCode(String, Class)

convertPropertyErrorCode

public String convertPropertyErrorCode(String errorCode,
                                       Class clazz,
                                       String propertyName)
Returns the passed in error code.

Specified by:
convertPropertyErrorCode in interface ErrorCodeConverter
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.
See Also:
ErrorCodeConverter.convertPropertyErrorCode(String, Class, String)


Copyright © 2009. All Rights Reserved.