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 methodcreate
provides an end-point to create a ticket.The methodget
provides an end-point to get a ticket.The methodlist
provides means to retrieve a page of tickets.boolean
The methodremove
provides 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 methodcreate
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 methodget
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 methodlist
provides 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 methodremove
provides an end-point to remove a ticket.- Parameters:
key
- the key- Returns:
true
iff the user has existed
-