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
FieldsFields 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_8Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancelRequisition(org.springframework.ui.Model model) Cancels a requisition (POST) to the punch out provider sending a cancel message.protected StringgetRedirectPage(String operation) Select page that user will be redirected depending on the provided punchout operation.protected StringgetTargetPage(PunchOutSession punchoutSession, String redirectUrl) get Target page that user will be redirected depending on the provided punchout getTargetId().handleException(Exception e, javax.servlet.http.HttpServletRequest request) voidhandlePunchOutSession(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.placeRequisition(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 StringprintSessionInfo(PunchOutSession punchoutSession) protected voidprocessRequisitionMessage(CXML cXML, org.springframework.ui.Model model) 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, urlEncodeMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
Field Details
-
REDIRECT_PREFIX
- See Also:
-
ADDON_PREFIX
- See Also:
-
BASE_ADDON_PAGE_PATH
- See Also:
-
-
Constructor Details
-
DefaultPunchOutController
public DefaultPunchOutController()
-
-
Method Details
-
handlePunchOutSession
@GetMapping("/punchout/cxml/session") public void handlePunchOutSession(@RequestParam("sid") String sessionId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException Used to create a new punch out session by authenticating a punch out user.- Parameters:
sessionId- the hybris session ID- Throws:
IOException
-
getRedirectPage
Select page that user will be redirected depending on the provided punchout operation.- Parameters:
operation-
-
getTargetPage
get Target page that user will be redirected depending on the provided punchout getTargetId().- Parameters:
punchoutSession- ,redirectUrl
-
cancelRequisition
@GetMapping("/punchout/cxml/cancel") public String cancelRequisition(org.springframework.ui.Model model) throws CMSItemNotFoundException Cancels a requisition (POST) to the punch out provider sending a cancel message.- Returns:
- Redirect to cart page.
- Throws:
CMSItemNotFoundException
-
printSessionInfo
-
placeRequisition
@GetMapping("/punchout/cxml/requisition") public String placeRequisition(org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request) throws CMSItemNotFoundException Places a requisition (POST) to the punchout provider sending the information of the cart.- Returns:
- Redirect to cart page.
- Throws:
CMSItemNotFoundException
-
processRequisitionMessage
protected void processRequisitionMessage(CXML cXML, org.springframework.ui.Model model) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
handleException
@ExceptionHandler(java.lang.Exception.class) public String handleException(Exception e, javax.servlet.http.HttpServletRequest request)
-