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
-
Field Summary
Fields inherited from class de.hybris.platform.customerticketingocc.controllers.TicketBaseController
DEFAULT_CURRENT_PAGE, DEFAULT_PAGE_SIZE, INVALID_REQUEST_BODY_ERROR_MESSAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTicket(TicketStarterWsDTO ticketStarter, String fields) createTicketEvent(String ticketId, TicketEventWsDTO ticketEvent, String fields) createTicketEventAttachment(String ticketId, String eventCode, org.springframework.web.multipart.MultipartFile ticketEventAttachment, String fields) protected Optional<TicketEventAttachmentFileData>getAttachmentFileByAttachmentId(String ticketId, String eventCode, String attachmentId) protected Optional<TicketEventAttachmentData>getLastTicketEventAttachment(TicketEventData ticketEventData) getTicketAssociatedObjects(String fields) protected Optional<TicketData>getTicketById(String ticketId) getTicketCategories(String fields) org.springframework.http.ResponseEntity<byte[]>getTicketEventAttachment(@Valid String ticketId, @Valid String eventCode, @Valid String attachmentId) org.springframework.validation.ValidatorgetTickets(int currentPage, int pageSize, String sort, String fields) org.springframework.validation.ValidatorvoidsetTicketEventValidator(org.springframework.validation.Validator ticketEventValidator) voidsetTicketFacade(TicketFacade ticketFacade) voidsetTicketStarterValidator(org.springframework.validation.Validator ticketStarterValidator) Methods inherited from class de.hybris.platform.customerticketingocc.controllers.TicketBaseController
getDataMapper, handleErrorInternal, handleHttpMessageNotReadableException, logParam, logParam, logValue, sanitize, setDataMapper, validate
-
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
-
getLastTicketEventAttachment
protected Optional<TicketEventAttachmentData> getLastTicketEventAttachment(TicketEventData ticketEventData) -
getAttachmentFileByAttachmentId
protected Optional<TicketEventAttachmentFileData> getAttachmentFileByAttachmentId(String ticketId, String eventCode, String attachmentId) -
getTicketFacade
-
setTicketFacade
-
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)
-