Class DefaultOrderHistoryPopulator
- java.lang.Object
-
- de.hybris.platform.sap.sapordermgmtservices.converters.populator.DefaultOrderHistoryPopulator
-
- All Implemented Interfaces:
Populator<SearchResult,OrderHistoryData>
public class DefaultOrderHistoryPopulator extends java.lang.Object implements Populator<SearchResult,OrderHistoryData>
Default implementation for populating order history from a BOL search result.
-
-
Constructor Summary
Constructors Constructor Description DefaultOrderHistoryPopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DeliveryStatusgetShippingstatus(SearchResult source)Determines the shipping status from the BOL representation of an order search result.voidpopulate(SearchResult source, OrderHistoryData target)Populate the target instance with values from the source instance.protected voidpopulateCondensedstatus(SearchResult source, OrderHistoryData target)Compiles a condensed status from overall and delivery status, seeOrderHistoryData.setCondensedStatus(String).protected voidpopulateOverallstatus(SearchResult source, OrderHistoryData target)Maps overall BOL status into hybris overall status, seeOrderHistoryData.setStatus(OrderStatus)
-
-
-
Method Detail
-
populate
public void populate(SearchResult source, OrderHistoryData target) throws ConversionException
Description copied from interface:PopulatorPopulate the target instance with values from the source instance.- Specified by:
populatein interfacePopulator<SearchResult,OrderHistoryData>- Parameters:
source- the source objecttarget- the target to fill- Throws:
ConversionException- if an error occurs
-
populateOverallstatus
protected void populateOverallstatus(SearchResult source, OrderHistoryData target)
Maps overall BOL status into hybris overall status, seeOrderHistoryData.setStatus(OrderStatus)- Parameters:
source- BOL search resulttarget- Order history data
-
getShippingstatus
protected DeliveryStatus getShippingstatus(SearchResult source)
Determines the shipping status from the BOL representation of an order search result.- Parameters:
source- BOL search result- Returns:
- Delivery status in hybris representation (which is shipping status in SAP terminology)
-
populateCondensedstatus
protected void populateCondensedstatus(SearchResult source, OrderHistoryData target)
Compiles a condensed status from overall and delivery status, seeOrderHistoryData.setCondensedStatus(String).
In case the overall status is completed, condensed status will also be set to completed, otherwise condensed status will be equal to delivery status.- Parameters:
source- BOL search resulttarget- Order history data
-
-