Package org.ctan.site.resources.admin
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 Summary
ConstructorsConstructorDescriptionTicket3Resource(@NonNull TicketStore store) This is the constructor for the classTicket3Resource. -
Method Summary
Modifier and TypeMethodDescriptionThe methodcreateprovides an end-point to create a ticket.The methodgetprovides an end-point to get a ticket.The methodlistprovides means to retrieve a page of tickets.booleanThe methodremoveprovides an end-point to remove a ticket.
-
Constructor Details
-
Ticket3Resource
This is the constructor for the classTicket3Resource.- Parameters:
store- the underlying store
-
-
Method Details
-
create
The methodcreateprovides 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 methodgetprovides an end-point to get a ticket.- Parameters:
key- the key- Returns:
trueiff 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 methodlistprovides means to retrieve a page of tickets.- Parameters:
q- the name patternpage- the pagesize- the page sizeorderBy- the orderasc- 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 methodremoveprovides an end-point to remove a ticket.- Parameters:
key- the key- Returns:
trueiff the user has existed
-