Class HeaderMapper
java.lang.Object
de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.BaseMapper
de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.HeaderMapper
Responsible to map header attributes from the LO-API response to the header BO representation. Used for reading and
writing data to ERP.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConverterConverter BOprotected GenericFactoryFactory to access SAP session beansstatic final StringLO-API ID of header segmentstatic final Log4JWrapperLogging instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcalculateValuesWOFreight(Header header) Calculates Net and Gross values without Freight.de.hybris.platform.servicelayer.i18n.CommonI18NServicevoidinit()Bean initializer.voidread(com.sap.conn.jco.JCoStructure esHeadComV, com.sap.conn.jco.JCoStructure esHeadComR, com.sap.conn.jco.JCoTable ttHeadCondV, BackendState backendState, TransactionConfiguration shop, Map<String, String> headerPriceAttribs, Map<String, String> itemsPropMap, Map<String, String> headerPropMap, SalesDocument salesDocument, Header header) Fill header BOL attributes from the LO-API responseprotected voidreadEsHeadComR(com.sap.conn.jco.JCoStructure esHeadComR, Header header, Map<String, String> ipcHeadPropMap, Map<String, String> ipcHeadAttribMap, Map<String, String> ipcItemPropMap, TransactionConfiguration shop) Handle output fields of structure ES_HEAD_COMRprotected voidreadEsHeadComV(com.sap.conn.jco.JCoStructure esHeadComV, Header header, boolean setIpcPriceAttributes, boolean shippingConditionAsText, SalesDocument businessObjectInterface, BackendState baseR3Lrd, com.sap.conn.jco.JCoStructure esHeadComR) Handle output fields of structure ES_HEAD_COMVprotected voidreadTtHeadCondV(com.sap.conn.jco.JCoTable ttHeadCondV, com.sap.conn.jco.JCoStructure esHeadComR, Header header, String headerCondTypeFreight) Handle output fields of structure TT_HEAD_COND_COMVvoidsetCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService) voidsetConverter(Converter converter) voidsetGenericFactory(GenericFactory genericFactory) Injected generic factory.protected voidsetValidFromDateForQuotations(com.sap.conn.jco.JCoStructure esHeadComR, Header header, DocumentType docType) Sets the valid From date, if the document is a Quotation.protected voidsetValidToDateForQuotations(com.sap.conn.jco.JCoStructure esHeadComV, Header header, DocumentType docType) Sets the valid To date, if the document is a Quotation.protected voidwrite(Header salesDocHeader, BackendState salesDocR3Lrd, com.sap.conn.jco.JCoStructure headComV, com.sap.conn.jco.JCoStructure headComX, TransactionConfiguration config) Writes header attributes to prepare the LO-API update callMethods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.strategy.BaseMapper
addToObjInst
-
Field Details
-
OBJECT_ID_HEAD
LO-API ID of header segment- See Also:
-
sapLogger
Logging instance -
genericFactory
Factory to access SAP session beans -
converter
Converter BO
-
-
Constructor Details
-
HeaderMapper
public HeaderMapper()
-
-
Method Details
-
setConverter
- Parameters:
converter-
-
setGenericFactory
Injected generic factory.- Parameters:
genericFactory-
-
init
public void init()Description copied from class:BaseMapperBean initializer.Check if all mandatory values injected, else throw runtime error.
- Specified by:
initin classBaseMapper
-
read
public void read(com.sap.conn.jco.JCoStructure esHeadComV, com.sap.conn.jco.JCoStructure esHeadComR, com.sap.conn.jco.JCoTable ttHeadCondV, BackendState backendState, TransactionConfiguration shop, Map<String, String> headerPriceAttribs, Map<String, String> itemsPropMap, Map<String, String> headerPropMap, SalesDocument salesDocument, Header header) Fill header BOL attributes from the LO-API response- Parameters:
esHeadComV- JCO structureesHeadComR- JCO structurettHeadCondV- Header condition tablebackendState- Contains backend stateful attributesshop- ConfigurationreadParams- Read parametersheaderPriceAttribs-itemsPropMap-headerPropMap-salesDocument- BOL cart or orderheader- BOL header of cart or order
-
readEsHeadComV
protected void readEsHeadComV(com.sap.conn.jco.JCoStructure esHeadComV, Header header, boolean setIpcPriceAttributes, boolean shippingConditionAsText, SalesDocument businessObjectInterface, BackendState baseR3Lrd, com.sap.conn.jco.JCoStructure esHeadComR) Handle output fields of structure ES_HEAD_COMV- Parameters:
esHeadComV-header-setIpcPriceAttributes-shippingConditionAsText-businessObjectInterface-baseR3Lrd-esHeadComR-
-
setValidToDateForQuotations
protected void setValidToDateForQuotations(com.sap.conn.jco.JCoStructure esHeadComV, Header header, DocumentType docType) Sets the valid To date, if the document is a Quotation.- Parameters:
esHeadComV- the LRD Header structureheader- the document headerdocType- the document Type
-
readEsHeadComR
protected void readEsHeadComR(com.sap.conn.jco.JCoStructure esHeadComR, Header header, Map<String, String> ipcHeadPropMap, Map<String, String> ipcHeadAttribMap, Map<String, String> ipcItemPropMap, TransactionConfiguration shop) Handle output fields of structure ES_HEAD_COMR- Parameters:
esHeadComR-header-readParams-ipcHeadPropMap-ipcHeadAttribMap-ipcItemPropMap-shop-
-
setValidFromDateForQuotations
protected void setValidFromDateForQuotations(com.sap.conn.jco.JCoStructure esHeadComR, Header header, DocumentType docType) Sets the valid From date, if the document is a Quotation.- Parameters:
esHeadComR- the LRD Header read only structureheader- the document headerdocType- the document Type
-
readTtHeadCondV
protected void readTtHeadCondV(com.sap.conn.jco.JCoTable ttHeadCondV, com.sap.conn.jco.JCoStructure esHeadComR, Header header, String headerCondTypeFreight) Handle output fields of structure TT_HEAD_COND_COMV- Parameters:
ttHeadCondV-esHeadComR-header-headerCondTypeFreight-
-
calculateValuesWOFreight
Calculates Net and Gross values without Freight.- Parameters:
header- BOL header of sales document
-
write
protected void write(Header salesDocHeader, BackendState salesDocR3Lrd, com.sap.conn.jco.JCoStructure headComV, com.sap.conn.jco.JCoStructure headComX, TransactionConfiguration config) Writes header attributes to prepare the LO-API update call- Parameters:
salesDocHeader-salesDocR3Lrd-headComV-headComX-config-
-
getCommonI18NService
public de.hybris.platform.servicelayer.i18n.CommonI18NService getCommonI18NService()- Returns:
- the commonI18NService
-
setCommonI18NService
public void setCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService) - Parameters:
commonI18NService- the commonI18NService to set
-