Class DefaultPunchOutService
- java.lang.Object
-
- de.hybris.platform.b2b.punchout.services.impl.DefaultPunchOutService
-
- All Implemented Interfaces:
PunchOutService
public class DefaultPunchOutService extends java.lang.Object implements PunchOutService
Default implementation ofPunchOutService.
-
-
Constructor Summary
Constructors Constructor Description DefaultPunchOutService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CartModelgetCartModel()protected CartServicegetCartService()protected CommerceCartServicegetCommerceCartService()java.util.List<PunchOutProcessingAction<CXML,CXML>>getProfileRequestProcessingActions()PunchOutCredentialServicegetPunchOutCredentialService()protected java.util.List<PunchOutProcessingAction<CartModel,CXML>>getPunchOutTransactionActions()java.util.List<PunchOutProcessingAction<CXML,CartModel>>getPurchaseOrderProcessingActions()java.util.List<PunchOutProcessingAction<CXML,CXML>>getSetUpRequestProcessingActions()CXMLprocessCancelPunchOutOrderMessage()Creates the cancel message for Ariba.CXMLprocessProfileRequest(CXML request)Processes a profile request by returned a ProfileResponse with populated supported transactions.CXMLprocessPunchOutOrderMessage()Creates the cmxl message for aPunchOutOrderMessageto send an Order, using the session cart.CXMLprocessPunchOutSetUpRequest(CXML request)Processes a new PunchOut setup request.CXMLprocessPurchaseOrderRequest(CXML requestBody, CartModel cartModel)Processes a purchase order (OrderRequest) by populating a cart and handles the response in the form ofCXML.java.lang.StringretrieveIdentity(CXML request)Retrieve the user id of the originator of the cXML request.
f.y.i.: as there may be multiple credentials declared, the first valid one will be used.voidsetCartService(CartService cartService)voidsetCommerceCartService(CommerceCartService commerceCartService)voidsetProfileRequestProcessingActions(java.util.List<PunchOutProcessingAction<CXML,CXML>> profileRequestProcessingActions)voidsetPunchOutCredentialService(PunchOutCredentialService punchOutCredentialService)voidsetPunchOutTransactionActions(java.util.List<PunchOutProcessingAction<CartModel,CXML>> createRequisitionReponseActions)voidsetPurchaseOrderProcessingActions(java.util.List<PunchOutProcessingAction<CXML,CartModel>> purchaseOrderProcessingActions)voidsetSetUpRequestProcessingActions(java.util.List<PunchOutProcessingAction<CXML,CXML>> setUpRequestProcessingActions)
-
-
-
Method Detail
-
processPunchOutSetUpRequest
public CXML processPunchOutSetUpRequest(CXML request)
Description copied from interface:PunchOutServiceProcesses a new PunchOut setup request.- Specified by:
processPunchOutSetUpRequestin interfacePunchOutService- Parameters:
request- the request- Returns:
- the
CXMLresponse
-
processPunchOutOrderMessage
public CXML processPunchOutOrderMessage()
Description copied from interface:PunchOutServiceCreates the cmxl message for aPunchOutOrderMessageto send an Order, using the session cart.- Specified by:
processPunchOutOrderMessagein interfacePunchOutService- Returns:
- the
CXMLobject representing an OrderMessage filled with information from the session cart.
-
processCancelPunchOutOrderMessage
public CXML processCancelPunchOutOrderMessage()
Description copied from interface:PunchOutServiceCreates the cancel message for Ariba.- Specified by:
processCancelPunchOutOrderMessagein interfacePunchOutService- Returns:
- the
CXMLwith the cancel message.
-
processPurchaseOrderRequest
public CXML processPurchaseOrderRequest(CXML requestBody, CartModel cartModel)
Description copied from interface:PunchOutServiceProcesses a purchase order (OrderRequest) by populating a cart and handles the response in the form ofCXML.- Specified by:
processPurchaseOrderRequestin interfacePunchOutService- Parameters:
requestBody- the requestCXMLobjectcartModel- the shopping cart data to populate- Returns:
- the
CXMLresponse
-
retrieveIdentity
public java.lang.String retrieveIdentity(CXML request)
Description copied from interface:PunchOutServiceRetrieve the user id of the originator of the cXML request.
f.y.i.: as there may be multiple credentials declared, the first valid one will be used.- Specified by:
retrieveIdentityin interfacePunchOutService- Parameters:
request- the cXML request.- Returns:
- the identity in the "From" tag.
-
processProfileRequest
public CXML processProfileRequest(CXML request)
Description copied from interface:PunchOutServiceProcesses a profile request by returned a ProfileResponse with populated supported transactions.- Specified by:
processProfileRequestin interfacePunchOutService- Parameters:
request- the profile request- Returns:
- the resulting
CXMLinstance with aProfileResponsepart of it
-
getCartModel
protected CartModel getCartModel()
-
setSetUpRequestProcessingActions
public void setSetUpRequestProcessingActions(java.util.List<PunchOutProcessingAction<CXML,CXML>> setUpRequestProcessingActions)
-
getPunchOutTransactionActions
protected java.util.List<PunchOutProcessingAction<CartModel,CXML>> getPunchOutTransactionActions()
-
setPunchOutTransactionActions
public void setPunchOutTransactionActions(java.util.List<PunchOutProcessingAction<CartModel,CXML>> createRequisitionReponseActions)
-
getPurchaseOrderProcessingActions
public java.util.List<PunchOutProcessingAction<CXML,CartModel>> getPurchaseOrderProcessingActions()
-
setPurchaseOrderProcessingActions
public void setPurchaseOrderProcessingActions(java.util.List<PunchOutProcessingAction<CXML,CartModel>> purchaseOrderProcessingActions)
-
getSetUpRequestProcessingActions
public java.util.List<PunchOutProcessingAction<CXML,CXML>> getSetUpRequestProcessingActions()
-
getProfileRequestProcessingActions
public java.util.List<PunchOutProcessingAction<CXML,CXML>> getProfileRequestProcessingActions()
-
setProfileRequestProcessingActions
public void setProfileRequestProcessingActions(java.util.List<PunchOutProcessingAction<CXML,CXML>> profileRequestProcessingActions)
-
getCartService
protected CartService getCartService()
-
setCartService
public void setCartService(CartService cartService)
-
getCommerceCartService
protected CommerceCartService getCommerceCartService()
-
setCommerceCartService
public void setCommerceCartService(CommerceCartService commerceCartService)
-
getPunchOutCredentialService
public PunchOutCredentialService getPunchOutCredentialService()
-
setPunchOutCredentialService
public void setPunchOutCredentialService(PunchOutCredentialService punchOutCredentialService)
-
-