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 Details

    • CrudLicense3Resource

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

    • create

      @POST @Path("/license") @UnitOfWork("siteDb") public License create(@NonNull @NonNull License license)
      The method create 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 method get 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 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("/license/{id}") @UnitOfWork("siteDb") public boolean remove(@PathParam("id") Long id)
      The method remove provides an end-point to remove a ticket.
      Parameters:
      id - the id
      Returns:
      true iff the user has existed