org.dozer.spring
Class DozerBeanMapperFactoryBean

java.lang.Object
  extended by org.dozer.spring.DozerBeanMapperFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

public class DozerBeanMapperFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean

Public Spring FactoryBean that can be used by application code. Uses Spring InitializingBean and DisposableBean contracts to properly start-up and release global Dozer resources.

Author:
S'ren Chittka, dmitry.buzdin

Constructor Summary
DozerBeanMapperFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
          Spring DisposableBean method implemention.
 java.lang.Object getObject()
           
 java.lang.Class<Mapper> getObjectType()
           
 boolean isSingleton()
           
 void setCustomConverters(java.util.List<CustomConverter> customConverters)
           
 void setCustomConvertersWithId(java.util.Map<java.lang.String,CustomConverter> customConvertersWithId)
           
 void setEventListeners(java.util.List<DozerEventListener> eventListeners)
           
 void setFactories(java.util.Map<java.lang.String,BeanFactory> factories)
           
 void setMappingFiles(org.springframework.core.io.Resource[] mappingFiles)
          Spring resources definition for providing mapping file location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DozerBeanMapperFactoryBean

public DozerBeanMapperFactoryBean()
Method Detail

setMappingFiles

public final void setMappingFiles(org.springframework.core.io.Resource[] mappingFiles)
Spring resources definition for providing mapping file location. Could be used for loading all mapping files by wildcard definition for example <bean class="org.dozer.spring.DozerBeanMapperFactoryBean"> <property name="mappingFiles" value="classpath*:/*.dozer.xml"/> </bean>

Parameters:
mappingFiles - Spring resource definition

setCustomConverters

public final void setCustomConverters(java.util.List<CustomConverter> customConverters)

setCustomConvertersWithId

public void setCustomConvertersWithId(java.util.Map<java.lang.String,CustomConverter> customConvertersWithId)

setEventListeners

public final void setEventListeners(java.util.List<DozerEventListener> eventListeners)

setFactories

public final void setFactories(java.util.Map<java.lang.String,BeanFactory> factories)

getObject

public final java.lang.Object getObject()
                                 throws java.lang.Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean
Throws:
java.lang.Exception

getObjectType

public final java.lang.Class<Mapper> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean

isSingleton

public final boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean

afterPropertiesSet

public final void afterPropertiesSet()
                              throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

destroy

public void destroy()
             throws java.lang.Exception
Spring DisposableBean method implemention. Triggered when application context is stopped. Used to release global Dozer resources for hot redeployment without stopping the JVM.

Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception


Copyright © 2006-2010 dozer. All Rights Reserved.