Class DefaultPunchOutController

All Implemented Interfaces:
PunchOutController

@Component public class DefaultPunchOutController extends AbstractPageController implements PunchOutController
  • Field Details

  • 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

      protected String getRedirectPage(String operation)
      Select page that user will be redirected depending on the provided punchout operation.
      Parameters:
      operation -
    • getTargetPage

      protected String getTargetPage(PunchOutSession punchoutSession, String redirectUrl)
      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

      protected String printSessionInfo(PunchOutSession punchoutSession)
    • 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)