Class 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 Detail

      • DefaultCMSDataMapper

        public DefaultCMSDataMapper()
    • Method Detail

      • map

        public java.lang.Object map​(java.lang.Object data,
                                    java.lang.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,
                                 java.lang.Class<D> destinationClass,
                                 java.lang.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
      • setConverters

        public void setConverters​(java.util.List<DataToWsConverter> converters)