Class DefaultCMSDataMapper

java.lang.Object
ma.glasnost.orika.impl.ConfigurableMapper
de.hybris.platform.webservicescommons.mapping.impl.DefaultDataMapper
de.hybris.platform.cmsoccaddon.mapping.DefaultCMSDataMapper
All Implemented Interfaces:
CMSDataMapper, DataMapper, ma.glasnost.orika.MapperFacade, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class DefaultCMSDataMapper extends DefaultDataMapper implements CMSDataMapper
The mapper to convert an object to another object using DefaultDataMapper. It uses the list of converters for different source types.
  • Constructor Details

    • DefaultCMSDataMapper

      public DefaultCMSDataMapper()
  • Method Details

    • map

      public Object map(Object data, String fields)
      Description copied from interface: CMSDataMapper
      Method to convert a source object to a target object using jaxb.
      Specified by:
      map in interface CMSDataMapper
      Parameters:
      data - the source object
      fields - the list of fields to populate in the target object
      Returns:
      the target object
    • map

      public <S, D> D map(S sourceObject, Class<D> destinationClass, String fields)
      Description copied from interface: DataMapper
      Create and return a new instance of type D mapped with the specified fields of sourceObject.
      Specified by:
      map in interface DataMapper
      Overrides:
      map in class DefaultDataMapper
      Parameters:
      sourceObject - the object to map from
      destinationClass - the type of the new object to return
      fields - comma-separated fields to map
      Returns:
      a new instance of type D mapped with the fields of sourceObject
    • configure

      protected void configure(ma.glasnost.orika.MapperFactory factory)
      Overrides:
      configure in class DefaultDataMapper
    • getConverters

      protected List<DataToWsConverter> getConverters()
    • setConverters

      public void setConverters(List<DataToWsConverter> converters)