org.directwebremoting.convert
Class MinimalistExceptionConverter

java.lang.Object
  extended by org.directwebremoting.convert.BaseV20Converter
      extended by org.directwebremoting.convert.BasicObjectConverter
          extended by org.directwebremoting.convert.BeanConverter
              extended by org.directwebremoting.convert.MinimalistExceptionConverter
All Implemented Interfaces:
Converter, NamedConverter

public class MinimalistExceptionConverter
extends BeanConverter

A special case of BeanConverter for use by default with Throwables, which only outputs a "broken" message.

In other words, by default the user doesn't get to learn anything about failures on the server.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Field Summary
 
Fields inherited from class org.directwebremoting.convert.BasicObjectConverter
converterManager, exclusions, inclusions, instanceType, javascript
 
Constructor Summary
MinimalistExceptionConverter()
           
 
Method Summary
 java.util.Map getPropertyMapFromClass(java.lang.Class type, boolean readRequired, boolean writeRequired)
          Get a map of property names to implementations of Property.
 
Methods inherited from class org.directwebremoting.convert.BeanConverter
createTypeHintContext, getPropertyMapFromObject
 
Methods inherited from class org.directwebremoting.convert.BasicObjectConverter
convertInbound, convertOutbound, extractInboundTokens, getConverterManager, getInstanceType, getJavascript, isAllowedByIncludeExcludeRules, setConverterManager, setExclude, setImplementation, setInclude, setInstanceType, setJavascript
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.directwebremoting.extend.Converter
convertInbound, convertOutbound, setConverterManager
 

Constructor Detail

MinimalistExceptionConverter

public MinimalistExceptionConverter()
Method Detail

getPropertyMapFromClass

public java.util.Map getPropertyMapFromClass(java.lang.Class type,
                                             boolean readRequired,
                                             boolean writeRequired)
                                      throws MarshallException
Description copied from interface: NamedConverter
Get a map of property names to implementations of Property.

HibernateBeanConverter (and maybe others) may want to provide alternate versions of bean.getClass(), and we may wish to fake or hide properties in some cases.

If you have a real object to investigate then it is probably better to call NamedConverter.getPropertyMapFromObject(Object, boolean, boolean) because that version can take into accound extra runtime type info.

Specified by:
getPropertyMapFromClass in interface NamedConverter
Overrides:
getPropertyMapFromClass in class BeanConverter
Parameters:
type - The class to find bean info from
readRequired - The properties returned must be readable
writeRequired - The properties returned must be writeable
Returns:
An array of PropertyDescriptors describing the beans properties
Throws:
MarshallException - If the introspection fails
See Also:
NamedConverter.getPropertyMapFromObject(Object, boolean, boolean)