Class 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 Dozer Mapper as TypeConverter for a CamelContext.

    While a mapper can be explicitly supplied as a parameter the CamelContext's registry will also be searched for Mapper instances. A DozerTypeConverter is created to wrap each Mapper instance and the mapper is queried for the types it converts. The queried types are used to register the TypeConverter with the context via its TypeConverterRegistry.

    • Field Summary

      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • 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 of DozerTypeConverters with the CamelContext.
      protected Map<String,​DozerBeanMapperConfiguration> lookupDozerBeanMapperConfigurations()
      Deprecated.
      Lookup the dozer DozerBeanMapperConfiguration to be used.
      protected Map<String,​com.github.dozermapper.core.Mapper> lookupDozerBeanMappers()
      Deprecated.
      Lookup the dozer Mapper 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 the CamelContext 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 interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Constructor Detail

      • DozerTypeConverterLoader

        public DozerTypeConverterLoader()
        Deprecated.
        Creates a DozerTypeConverter performing no TypeConverter registration.
      • DozerTypeConverterLoader

        public DozerTypeConverterLoader​(org.apache.camel.CamelContext camelContext)
        Deprecated.
        Creates a DozerTypeConverter that will search the given CamelContext for instances of Mapper. Each discovered instance will be wrapped as a DozerTypeConverter and register as a TypeConverter with the context
        Parameters:
        camelContext - the context to register the DozerTypeConverter in
      • DozerTypeConverterLoader

        public DozerTypeConverterLoader​(org.apache.camel.CamelContext camelContext,
                                        DozerBeanMapperConfiguration configuration)
        Deprecated.
        Creates a DozerTypeConverter using the given DozerBeanMapperConfiguration configuration.
        Parameters:
        camelContext - the context to register the DozerTypeConverter in
        configuration - 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 of DozerTypeConverters with the CamelContext.
        Parameters:
        camelContext - the context to register the DozerTypeConverter in
        mapper - the DozerMapperBean to be wrapped as a type converter.
      • lookupDozerBeanMappers

        protected Map<String,​com.github.dozermapper.core.Mapper> lookupDozerBeanMappers()
        Deprecated.
        Lookup the dozer Mapper 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 interface org.apache.camel.CamelContextAware
      • setCamelContext

        public void setCamelContext​(org.apache.camel.CamelContext camelContext)
        Deprecated.
        Sets the CamelContext and also initializes this loader.

        The reason why init(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 interface org.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 class org.apache.camel.support.service.BaseService
        Throws:
        Exception
      • doStop

        protected void doStop()
                       throws Exception
        Deprecated.
        Overrides:
        doStop in class org.apache.camel.support.service.BaseService
        Throws:
        Exception