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 methodcreateprovides an end-point to create a license.The methodgetprovides an end-point to get a license.The methodlistprovides means to retrieve a page of tickets.booleanThe methodremoveprovides 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 methodcreateprovides 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 methodgetprovides 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 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("/license/{id}") @UnitOfWork("siteDb") public boolean remove(@PathParam("id") Long id) The methodremoveprovides an end-point to remove a ticket.- Parameters:
id- the id- Returns:
trueiff the user has existed
-