Class Ticket3Resource

java.lang.Object
org.ctan.site.resources.admin.Ticket3Resource

@Path("/3.0/admin") @Produces("application/json") @RolesAllowed("ADMIN") public class Ticket3Resource extends Object
The class Ticket3Resource contains the CRUD controller for the tickets list resource.
  • Constructor Details

    • Ticket3Resource

      public Ticket3Resource(@NonNull @NonNull TicketStore store)
      This is the constructor for the class Ticket3Resource.
      Parameters:
      store - the underlying store
  • Method Details

    • create

      @POST @Path("/ticket") @UnitOfWork("siteDb") public Ticket create(@NonNull @NonNull Ticket ticket)
      The method create provides an end-point to create a ticket.
      Parameters:
      ticket - the ticket object to store
      Returns:
      the ticket transport object
    • get

      @GET @Path("/ticket/{key}") @UnitOfWork("siteDb") public Ticket get(@NonNull @PathParam("key") @NonNull String key)
      The method get provides an end-point to get a ticket.
      Parameters:
      key - the key
      Returns:
      true iff the ticket has existed
    • list

      @GET @Path("/tickets") @UnitOfWork("siteDb") public GeneralPage list(@QueryParam("q") String q, @QueryParam("page") int page, @QueryParam("size") int size, @QueryParam("order") String orderBy, @QueryParam("asc") boolean asc)
      The method list provides means to retrieve a page of tickets.
      Parameters:
      q - the name pattern
      page - the page
      size - the page size
      orderBy - the order
      asc - the indicator for ascending
      Returns:
      the page for the user or null
    • remove

      @DELETE @Path("/ticket/{key}") @UnitOfWork("siteDb") public boolean remove(@NonNull @PathParam("key") @NonNull String key)
      The method remove provides an end-point to remove a ticket.
      Parameters:
      key - the key
      Returns:
      true iff the user has existed