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) voidcreateTicketEvent(String ticketId, TicketEventWsDTO ticketEvent) getTicketAssociatedObjects(String fields) protected Optional<TicketData>getTicketById(String ticketId) getTicketCategories(String fields) 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 void createTicketEvent(@PathVariable String ticketId, @RequestBody TicketEventWsDTO ticketEvent) -
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) -
getTicketById
-
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)
-