wicket.util.convert
Class ConversionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by wicket.util.convert.ConversionException
All Implemented Interfaces:
java.io.Serializable

public final class ConversionException
extends java.lang.RuntimeException

Thrown for conversion exceptions. If it is desirable to override the default resource key used to construct the error message (TypeValidator), users should call setResourceKey(String)

Author:
Eelco Hillenius
See Also:
Serialized Form

Constructor Summary
ConversionException(java.lang.String message)
          Construct exception with message.
ConversionException(java.lang.String message, java.lang.Throwable cause)
          Construct exception with message and cause.
ConversionException(java.lang.Throwable cause)
          Construct exception with cause.
 
Method Summary
 IConverter getConverter()
          Gets the used converter.
 java.text.Format getFormat()
          Get the used format.
 java.util.Locale getLocale()
           
 java.lang.String getResourceKey()
          Gets resourceKey
 java.lang.Object getSourceValue()
          Gets the tried value.
 java.lang.Class getTargetType()
          Gets the target property type.
 ITypeConverter getTypeConverter()
           
 ConversionException setConverter(IConverter converter)
          Sets the used converter.
 ConversionException setFormat(java.text.Format format)
          Sets the used format.
 ConversionException setLocale(java.util.Locale locale)
          Sets the used locale.
 void setResourceKey(java.lang.String resourceKey)
          Sets resourceKey.
 ConversionException setSourceValue(java.lang.Object sourceValue)
          Sets the tried value.
 ConversionException setTargetType(java.lang.Class targetType)
          Sets the target property type.
 ConversionException setTypeConverter(ITypeConverter typeConverter)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConversionException

public ConversionException(java.lang.String message)
Construct exception with message.

Parameters:
message - message

ConversionException

public ConversionException(java.lang.String message,
                           java.lang.Throwable cause)
Construct exception with message and cause.

Parameters:
message - message
cause - cause

ConversionException

public ConversionException(java.lang.Throwable cause)
Construct exception with cause.

Parameters:
cause - cause
Method Detail

getResourceKey

public java.lang.String getResourceKey()
Gets resourceKey

Returns:
resourceKey

setResourceKey

public void setResourceKey(java.lang.String resourceKey)
Sets resourceKey.

Parameters:
resourceKey - resourceKey

getConverter

public final IConverter getConverter()
Gets the used converter.

Returns:
the used converter.

getLocale

public final java.util.Locale getLocale()
Returns:
Locale

getFormat

public final java.text.Format getFormat()
Get the used format.

Returns:
the used format

getSourceValue

public final java.lang.Object getSourceValue()
Gets the tried value.

Returns:
the tried value.

getTargetType

public final java.lang.Class getTargetType()
Gets the target property type.

Returns:
the target property type.

getTypeConverter

public ITypeConverter getTypeConverter()
Returns:
Returns the typeConverter.

setConverter

public final ConversionException setConverter(IConverter converter)
Sets the used converter.

Parameters:
converter - the converter.
Returns:
This

setFormat

public final ConversionException setFormat(java.text.Format format)
Sets the used format.

Parameters:
format - the used format.
Returns:
This

setLocale

public final ConversionException setLocale(java.util.Locale locale)
Sets the used locale.

Parameters:
locale - the used locale.
Returns:
This

setSourceValue

public final ConversionException setSourceValue(java.lang.Object sourceValue)
Sets the tried value.

Parameters:
sourceValue - the tried value.
Returns:
This

setTargetType

public final ConversionException setTargetType(java.lang.Class targetType)
Sets the target property type.

Parameters:
targetType - sets the target property type
Returns:
This

setTypeConverter

public ConversionException setTypeConverter(ITypeConverter typeConverter)
Parameters:
typeConverter - The typeConverter to set.
Returns:
This


Copyright © 2004-2007 Wicket developers. All Rights Reserved.