Class DefaultPunchOutController
- java.lang.Object
-
- de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
-
- de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
-
- de.hybris.platform.b2bpunchoutaddon.controllers.pages.DefaultPunchOutController
-
- All Implemented Interfaces:
PunchOutController
@Component public class DefaultPunchOutController extends AbstractPageController implements PunchOutController
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringADDON_PREFIXstatic java.lang.StringBASE_ADDON_PAGE_PATHstatic java.lang.StringREDIRECT_PREFIX-
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
CMS_PAGE_MODEL, CMS_PAGE_TITLE, PAGE_ROOT, REDIRECT_TO_LOGIN_FOR_CHECKOUT, REDIRECT_TO_MULTISTEP_CHECKOUT, REGISTRATION_CONSENT_ID, UTF_8
-
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, ROOT
-
-
Constructor Summary
Constructors Constructor Description DefaultPunchOutController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcancelRequisition(org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request)Cancels a requisition (POST) to the punch out provider sending a cancel message.PunchOutUserAuthenticationServicegetPunchOutUserAuthenticationService()java.lang.StringhandleException(java.lang.Exception e, javax.servlet.http.HttpServletRequest request)voidhandlePunchOutSession(java.lang.String key, java.lang.String sessionId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Used to create a new punch out session by authenticating a punch out user.java.lang.StringplaceRequisition(org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request)Places a requisition (POST) to the punchout provider sending the information of the cart.protected java.lang.StringprintSessionInfo(PunchOutSession punchoutSession)protected voidprocessRequisitionMessage(CXML cXML, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request)voidsetPunchOutService(PunchOutService punchoutService)voidsetPunchOutUserAuthenticationService(PunchOutUserAuthenticationService punchOutUserAuthenticationService)-
Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
addRegistrationConsentDataToModel, checkRequestUrl, createMetaElement, decodeWithScheme, getBaseSiteService, getCheckoutRedirectUrl, getCmsPageService, getCmsPreviewService, getCmsSiteService, getConfigurationService, getConsentFacade, getContentPageForLabelOrId, getCurrencies, getCurrentCurrency, getCurrentLanguage, getCustomerFacade, getHostConfigService, getI18nService, getLanguages, getMessageSource, getPageTitleResolver, getRequestContextData, getSessionService, getSiteConfigService, getSiteName, getSiteUid, getStoreSessionFacade, getUser, getUserFacade, getViewForPage, getViewForPage, prepareNotFoundPage, setUpMetaData, setUpMetaDataForContentPage, storeCmsPageInModel, storeContentPageTitleInModel, storeContinueUrl, urlEncode
-
Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
-
-
-
Field Detail
-
REDIRECT_PREFIX
public static final java.lang.String REDIRECT_PREFIX
- See Also:
- Constant Field Values
-
ADDON_PREFIX
public static final java.lang.String ADDON_PREFIX
- See Also:
- Constant Field Values
-
BASE_ADDON_PAGE_PATH
public static final java.lang.String BASE_ADDON_PAGE_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
handlePunchOutSession
@RequestMapping(value="/punchout/cxml/session", method=GET) public void handlePunchOutSession(@RequestParam java.lang.String key, @RequestParam("sid") java.lang.String sessionId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Used to create a new punch out session by authenticating a punch out user.- Parameters:
key- Secured key that have been exchanged with the punch out provider (or security hub).sessionId- the hybris session ID
-
cancelRequisition
@RequestMapping(value="/punchout/cxml/cancel", method=GET) public java.lang.String cancelRequisition(org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request) throws InvalidCartException, CMSItemNotFoundExceptionCancels a requisition (POST) to the punch out provider sending a cancel message.- Returns:
- Redirect to cart page.
- Throws:
InvalidCartExceptionCMSItemNotFoundException
-
printSessionInfo
protected java.lang.String printSessionInfo(PunchOutSession punchoutSession)
-
placeRequisition
@RequestMapping(value="/punchout/cxml/requisition", method=GET) public java.lang.String placeRequisition(org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request) throws InvalidCartException, CMSItemNotFoundExceptionPlaces a requisition (POST) to the punchout provider sending the information of the cart.- Returns:
- Redirect to cart page.
- Throws:
InvalidCartExceptionCMSItemNotFoundException
-
processRequisitionMessage
protected void processRequisitionMessage(CXML cXML, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request) throws CMSItemNotFoundException
- Throws:
CMSItemNotFoundException
-
handleException
@ExceptionHandler(java.lang.Exception.class) public java.lang.String handleException(java.lang.Exception e, javax.servlet.http.HttpServletRequest request)
-
setPunchOutService
public void setPunchOutService(PunchOutService punchoutService)
-
getPunchOutUserAuthenticationService
public PunchOutUserAuthenticationService getPunchOutUserAuthenticationService()
-
setPunchOutUserAuthenticationService
public void setPunchOutUserAuthenticationService(PunchOutUserAuthenticationService punchOutUserAuthenticationService)
-
-