Interface DataToWsConverter<DATA,WSDTO>
- Type Parameters:
DATA- source typeWSDTO- 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 TypeMethodDescriptionPredicate to verify whether the convert method can be used or not.Method to convert a source object to a target object.voidcustomize(ma.glasnost.orika.MapperFactory factory) Method to customize conversion between source and target object.Class that represents a source objectClass 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 to verify whether the convert method can be used or not.- Returns:
TRUEwhen {convert(Object, String)can be performed;FALSEotherwise.
-
convert
Method to convert a source object to a target object.- Parameters:
source- the source objectfields- 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- theMapperFactorythat can be used to add new customization.
-