Class TicketsController

java.lang.Object
de.hybris.platform.customerticketingocc.controllers.TicketBaseController
de.hybris.platform.customerticketingocc.controllers.TicketsController

@RestController @RequestMapping("/{baseSiteId}") public class TicketsController extends TicketBaseController
  • Constructor Details

    • TicketsController

      public TicketsController()
  • Method Details

    • getTickets

      @GetMapping(value="/users/{userId}/tickets", produces="application/json") @ResponseStatus(OK) @Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP"}) public TicketListWsDTO getTickets(@RequestParam(value="currentPage",defaultValue="0") int currentPage, @RequestParam(value="pageSize",defaultValue="20") int pageSize, @RequestParam(value="sort",defaultValue="byDate") String sort, @RequestParam(required=false,defaultValue="BASIC") String fields)
    • createTicket

      @PostMapping(value="/users/{userId}/tickets", consumes="application/json", produces="application/json") @ResponseStatus(CREATED) @Secured("ROLE_CUSTOMERGROUP") public TicketWsDTO createTicket(@RequestBody TicketStarterWsDTO ticketStarter, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getTicket

      @GetMapping(value="/users/{userId}/tickets/{ticketId}", produces="application/json") @ResponseStatus(OK) @Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP"}) public TicketWsDTO getTicket(@PathVariable String ticketId, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • createTicketEvent

      @PostMapping(value="/users/{userId}/tickets/{ticketId}/events", consumes="application/json", produces="application/json") @ResponseStatus(CREATED) @Secured("ROLE_CUSTOMERGROUP") public TicketEventWsDTO createTicketEvent(@PathVariable String ticketId, @RequestBody TicketEventWsDTO ticketEvent, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getTicketCategories

      @GetMapping(value="/ticketCategories", produces="application/json") @ResponseStatus(OK) public TicketCategoryListWsDTO getTicketCategories(@RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getTicketAssociatedObjects

      @GetMapping(value="/users/{userId}/ticketAssociatedObjects", produces="application/json") @ResponseStatus(OK) @Secured("ROLE_CUSTOMERGROUP") public TicketAssociatedObjectListWsDTO getTicketAssociatedObjects(@RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getTicketEventAttachment

      @GetMapping(value="/users/{userId}/tickets/{ticketId}/events/{eventCode}/attachments/{attachmentId}", produces="application/octet-stream") @ResponseStatus(OK) @Secured("ROLE_CUSTOMERGROUP") public org.springframework.http.ResponseEntity<byte[]> getTicketEventAttachment(@PathVariable @Nonnull @Valid @Valid String ticketId, @PathVariable @Nonnull @Valid @Valid String eventCode, @PathVariable @Nonnull @Valid @Valid String attachmentId)
    • createTicketEventAttachment

      @PostMapping(value="/users/{userId}/tickets/{ticketId}/events/{eventCode}/attachments", consumes="multipart/form-data", produces="application/json") @ResponseStatus(CREATED) @Secured("ROLE_CUSTOMERGROUP") public TicketEventAttachmentWsDTO createTicketEventAttachment(@PathVariable String ticketId, @PathVariable String eventCode, @RequestParam("ticketEventAttachment") org.springframework.web.multipart.MultipartFile ticketEventAttachment, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getTicketById

      protected Optional<TicketData> getTicketById(String ticketId)
    • getLastTicketEventAttachment

      protected Optional<TicketEventAttachmentData> getLastTicketEventAttachment(TicketEventData ticketEventData)
    • getAttachmentFileByAttachmentId

      protected Optional<TicketEventAttachmentFileData> getAttachmentFileByAttachmentId(String ticketId, String eventCode, String attachmentId)
    • getTicketFacade

      public TicketFacade getTicketFacade()
    • setTicketFacade

      public void setTicketFacade(TicketFacade ticketFacade)
    • getTicketStarterValidator

      public org.springframework.validation.Validator getTicketStarterValidator()
    • setTicketStarterValidator

      public void setTicketStarterValidator(org.springframework.validation.Validator ticketStarterValidator)
    • getTicketEventValidator

      public org.springframework.validation.Validator getTicketEventValidator()
    • setTicketEventValidator

      public void setTicketEventValidator(org.springframework.validation.Validator ticketEventValidator)