Class AccountSupportTicketsPageController


  • @Controller
    @RequestMapping("/my-account")
    public class AccountSupportTicketsPageController
    extends AbstractPageController
    Controller for Customer Support tickets.
    • Constructor Detail

      • AccountSupportTicketsPageController

        public AccountSupportTicketsPageController()
    • Method Detail

      • initBinder

        @InitBinder
        protected void initBinder​(org.springframework.web.bind.WebDataBinder binder)
      • supportTickets

        @RequestMapping({"/support-tickets","/support-ticket/{ticketId:.*}","/add-support-ticket"})
        public java.lang.String supportTickets​(@RequestParam(value="ticketAdded",required=false,defaultValue="false")
                                               boolean ticketAdded,
                                               org.springframework.ui.Model model)
                                        throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • getSupportTicket

        @RequestMapping(value="/json/support-ticket/{ticketId:.*}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public TicketData getSupportTicket​(javax.servlet.http.HttpServletResponse response,
                                           @PathVariable("ticketId")
                                           java.lang.String ticketId)
                                    throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • getSupportTickets

        @RequestMapping(value="/json/support-ticket",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public java.util.List<TicketData> getSupportTickets​(javax.servlet.http.HttpServletResponse response,
                                                            @RequestParam("sort")
                                                            java.lang.String sort,
                                                            @RequestParam(value="pageNumber",defaultValue="1")
                                                            java.lang.Integer pageNumber,
                                                            @RequestParam(value="pageSize",defaultValue="5")
                                                            java.lang.Integer pageSize)
        Return list of tickets
        Parameters:
        response - - we need to pass the Hybris-Count header
      • addSupportTicket

        @RequestMapping(value="/json/support-ticket/add-support-ticket",
                        method=POST,
                        produces="application/json")
        public org.springframework.http.ResponseEntity<java.lang.String> addSupportTicket​(@RequestBody @Valid
                                                                                          @Valid TicketData ticketData)
        Creates the ticket and returns the proper response status
      • addMessage

        @RequestMapping(value="/json/support-ticket/{ticketId:.*}/conversations",
                        method=POST)
        @ResponseStatus(CREATED)
        public void addMessage​(@PathVariable
                               java.lang.String ticketId,
                               @RequestBody
                               Transcript transcript)
        Adds a ticket message and returns the proper response status
      • getSupportTicketTypes

        @RequestMapping(value="/json/support-ticket/ticketTypes",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public java.util.List<TicketType> getSupportTicketTypes()
        Return List of ticket types
      • getSupportTicketPriorities

        @RequestMapping(value="/json/support-ticket/ticketPriorities",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public java.util.List<TicketPriority> getSupportTicketPriorities()
        Return ticket priorities list
      • getPageableData

        protected PageableData getPageableData​(java.lang.String sort,
                                               java.lang.Integer pageNumber,
                                               java.lang.Integer pageSize)