Package org.apache.camel.converter.dozer
Class DozerTypeConverterLoader
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.converter.dozer.DozerTypeConverterLoader
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@Deprecated public class DozerTypeConverterLoader extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.CamelContextAware
Deprecated.DozerTypeConverterLoader
provides the mechanism for registering a DozerMapper
asTypeConverter
for aCamelContext
. While a mapper can be explicitly supplied as a parameter theCamelContext
's registry will also be searched forMapper
instances. ADozerTypeConverter
is created to wrap eachMapper
instance and the mapper is queried for the types it converts. The queried types are used to register theTypeConverter
with the context via itsTypeConverterRegistry
.
-
-
Constructor Summary
Constructors Constructor Description DozerTypeConverterLoader()
Deprecated.Creates aDozerTypeConverter
performing noTypeConverter
registration.DozerTypeConverterLoader(org.apache.camel.CamelContext camelContext)
Deprecated.Creates aDozerTypeConverter
that will search the givenCamelContext
for instances ofMapper
.DozerTypeConverterLoader(org.apache.camel.CamelContext camelContext, DozerBeanMapperConfiguration configuration)
Deprecated.Creates aDozerTypeConverter
using the givenDozerBeanMapperConfiguration
configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
addDozerTypeConverter(org.apache.camel.spi.TypeConverterRegistry registry, DozerTypeConverter converter, String dozerId, Class<?> to, Class<?> from)
Deprecated.protected void
doStart()
Deprecated.protected void
doStop()
Deprecated.org.apache.camel.CamelContext
getCamelContext()
Deprecated.com.github.dozermapper.core.Mapper
getMapper()
Deprecated.void
init(org.apache.camel.CamelContext camelContext, com.github.dozermapper.core.Mapper mapper)
Deprecated.Doses the actual querying and registration ofDozerTypeConverter
s with theCamelContext
.protected Map<String,DozerBeanMapperConfiguration>
lookupDozerBeanMapperConfigurations()
Deprecated.Lookup the dozerDozerBeanMapperConfiguration
to be used.protected Map<String,com.github.dozermapper.core.Mapper>
lookupDozerBeanMappers()
Deprecated.Lookup the dozerMapper
to be used.protected void
registerClassMaps(org.apache.camel.spi.TypeConverterRegistry registry, String dozerId, com.github.dozermapper.core.Mapper dozer, List<com.github.dozermapper.core.metadata.ClassMappingMetadata> all)
Deprecated.void
setCamelContext(org.apache.camel.CamelContext camelContext)
Deprecated.Sets theCamelContext
and also initializes this loader.void
setMapper(com.github.dozermapper.core.Mapper mapper)
Deprecated.-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
DozerTypeConverterLoader
public DozerTypeConverterLoader()
Deprecated.Creates aDozerTypeConverter
performing noTypeConverter
registration.
-
DozerTypeConverterLoader
public DozerTypeConverterLoader(org.apache.camel.CamelContext camelContext)
Deprecated.Creates aDozerTypeConverter
that will search the givenCamelContext
for instances ofMapper
. Each discovered instance will be wrapped as aDozerTypeConverter
and register as aTypeConverter
with the context- Parameters:
camelContext
- the context to register theDozerTypeConverter
in
-
DozerTypeConverterLoader
public DozerTypeConverterLoader(org.apache.camel.CamelContext camelContext, DozerBeanMapperConfiguration configuration)
Deprecated.Creates aDozerTypeConverter
using the givenDozerBeanMapperConfiguration
configuration.- Parameters:
camelContext
- the context to register theDozerTypeConverter
inconfiguration
- dozer mapping bean configuration.
-
-
Method Detail
-
init
public void init(org.apache.camel.CamelContext camelContext, com.github.dozermapper.core.Mapper mapper)
Deprecated.Doses the actual querying and registration ofDozerTypeConverter
s with theCamelContext
.- Parameters:
camelContext
- the context to register theDozerTypeConverter
inmapper
- the DozerMapperBean to be wrapped as a type converter.
-
lookupDozerBeanMappers
protected Map<String,com.github.dozermapper.core.Mapper> lookupDozerBeanMappers()
Deprecated.Lookup the dozerMapper
to be used.
-
lookupDozerBeanMapperConfigurations
protected Map<String,DozerBeanMapperConfiguration> lookupDozerBeanMapperConfigurations()
Deprecated.Lookup the dozerDozerBeanMapperConfiguration
to be used.
-
registerClassMaps
protected void registerClassMaps(org.apache.camel.spi.TypeConverterRegistry registry, String dozerId, com.github.dozermapper.core.Mapper dozer, List<com.github.dozermapper.core.metadata.ClassMappingMetadata> all)
Deprecated.
-
addDozerTypeConverter
protected void addDozerTypeConverter(org.apache.camel.spi.TypeConverterRegistry registry, DozerTypeConverter converter, String dozerId, Class<?> to, Class<?> from)
Deprecated.
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
Deprecated.- Specified by:
getCamelContext
in interfaceorg.apache.camel.CamelContextAware
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
Deprecated.Sets theCamelContext
and also initializes this loader. The reason whyinit(org.apache.camel.CamelContext, com.github.dozermapper.core.Mapper)
is also called is because making using Dozer in Spring XML files easier, as no need to use the init-method attribute.- Specified by:
setCamelContext
in interfaceorg.apache.camel.CamelContextAware
- Parameters:
camelContext
- the CamelContext
-
getMapper
public com.github.dozermapper.core.Mapper getMapper()
Deprecated.
-
setMapper
public void setMapper(com.github.dozermapper.core.Mapper mapper)
Deprecated.
-
doStart
protected void doStart() throws Exception
Deprecated.- Overrides:
doStart
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
-