Class CrudTopic3Resource

java.lang.Object
org.ctan.site.resources.admin.CrudTopic3Resource

@Path("/3.0/admin") @Produces("application/json") public class CrudTopic3Resource extends Object
The class CrudTopic3Resource contains the CRUD controller for the topics resource.
  • Constructor Details

    • CrudTopic3Resource

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

    • create

      @POST @Path("/topic") @UnitOfWork("siteDb") public Topic create(@NonNull @NonNull Topic topic)
      The method create provides an end-point to create a license.
      Parameters:
      topic - the topic object to store
      Returns:
      the updated entity
    • get

      @GET @Path("/topic/{id}") @UnitOfWork("siteDb") public Topic 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("/topics") @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 topics.
      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 topics or null
    • remove

      @DELETE @Path("/topic/{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