Interface DataToWsConverter<DATA,WSDTO>

Type Parameters:
DATA - source type
WSDTO - target type
All Known Implementing Classes:
AbstractDataToWsConverter, ComponentDataToWsConverter, MediaDataToWsConverter, NavigationNodeDataToWsConverter, PageDataToWsConverter, SlotDataToWsConverter

public interface DataToWsConverter<DATA,WSDTO>
Interface to convert object of type A to object of type B using jaxb.
  • Method Summary

    Modifier and Type
    Method
    Description
    Predicate to verify whether the convert method can be used or not.
    convert(DATA source, String fields)
    Method to convert a source object to a target object.
    void
    customize(ma.glasnost.orika.MapperFactory factory)
    Method to customize conversion between source and target object.
    Class that represents a source object
    Class that represents a target object
  • Method Details

    • getDataClass

      Class getDataClass()
      Class that represents a source object
      Returns:
      the Class
    • getWsClass

      Class getWsClass()
      Class that represents a target object
      Returns:
      the Class
    • canConvert

      Predicate<Object> canConvert()
      Predicate to verify whether the convert method can be used or not.
      Returns:
      TRUE when {convert(Object, String) can be performed; FALSE otherwise.
    • convert

      WSDTO convert(DATA source, String fields)
      Method to convert a source object to a target object.
      Parameters:
      source - the source object
      fields - the fields that should be populated in target object
      Returns:
      the target object
    • customize

      void customize(ma.glasnost.orika.MapperFactory factory)
      Method to customize conversion between source and target object. This method is called after the basic conversion is finished.
      Parameters:
      factory - the MapperFactory that can be used to add new customization.