Package org.ctan.site.resources.admin
Class CrudLicense3Resource
java.lang.Object
org.ctan.site.resources.admin.CrudLicense3Resource
@Path("/3.0/admin")
@Produces("application/json")
@RolesAllowed("ADMIN")
public class CrudLicense3Resource
extends Object
The class
CrudLicense3Resource
contains the CRUD controller for
the licenses resource.-
Constructor Summary
ConstructorsConstructorDescriptionCrudLicense3Resource
(@NonNull LicenseStore store) This is the constructor for the classCrudLicense3Resource
. -
Method Summary
Modifier and TypeMethodDescriptionThe methodcreate
provides an end-point to create a license.The methodget
provides an end-point to get a license.The methodlist
provides means to retrieve a page of tickets.boolean
The methodremove
provides an end-point to remove a ticket.
-
Constructor Details
-
CrudLicense3Resource
This is the constructor for the classCrudLicense3Resource
.- Parameters:
store
- the underlying store
-
-
Method Details
-
create
@POST @Path("/license") @UnitOfWork("siteDb") public License create(@NonNull @NonNull License license) The methodcreate
provides an end-point to create a license.- Parameters:
license
- the license object to store- Returns:
- the updated entity
-
get
@GET @Path("/license/{id}") @UnitOfWork("siteDb") public License get(@NonNull @PathParam("id") @NonNull Long id) The methodget
provides an end-point to get a license.- Parameters:
id
- the id- Returns:
- the license
-
list
@GET @Path("/licenses") @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("/license/{id}") @UnitOfWork("siteDb") public boolean remove(@PathParam("id") Long id) The methodremove
provides an end-point to remove a ticket.- Parameters:
id
- the id- Returns:
true
iff the user has existed
-