Class CrudGuestbook3Resource

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

@Path("/3.0/admin") @Produces("application/json") @RolesAllowed("ADMIN") public class CrudGuestbook3Resource extends Object
The class Ticket3Resource contains the CRUD controller for the tickets list resource.
  • Constructor Details

    • CrudGuestbook3Resource

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

    • create

      @POST @Path("/guest-book-item") @UnitOfWork("siteDb") public GuestBook create(@NonNull @NonNull GuestBook item)
      The method create provides an end-point to create a guest book item.
      Parameters:
      item - the item to store
      Returns:
      the updated entity
    • get

      @GET @Path("/guest-book-item/{id}") @UnitOfWork("siteDb") public GuestBook get(@NonNull @PathParam("id") @NonNull Long id)
      The method get provides an end-point to get a guest book item.
      Parameters:
      id - the id
      Returns:
      true iff the item has existed
    • list

      @GET @Path("/guest-book-items") @UnitOfWork("siteDb") public GeneralPage list(@QueryParam("q") String q, @QueryParam("page") @DefaultValue("1") int page, @QueryParam("size") @DefaultValue("256") int size, @QueryParam("order") String orderBy, @QueryParam("asc") boolean asc)
      The method list provides means to retrieve a page of guest book item.
      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("/guest-book-item/{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