Package org.ctan.site.resources.admin
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 Summary
ConstructorsConstructorDescriptionCrudGuestbook3Resource(@NonNull GuestBookStore store) This is the constructor for the classCrudUser3Resource. -
Method Summary
Modifier and TypeMethodDescriptionThe methodcreateprovides an end-point to create a guest book item.The methodgetprovides an end-point to get a guest book item.The methodlistprovides means to retrieve a page of guest book item.booleanremove(long id) The methodremoveprovides an end-point to remove a ticket.
-
Constructor Details
-
CrudGuestbook3Resource
This is the constructor for the classCrudUser3Resource.- Parameters:
store- the underlying store
-
-
Method Details
-
create
@POST @Path("/guest-book-item") @UnitOfWork("siteDb") public GuestBook create(@NonNull @NonNull GuestBook item) The methodcreateprovides 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 methodgetprovides an end-point to get a guest book item.- Parameters:
id- the id- Returns:
trueiff 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 methodlistprovides means to retrieve a page of guest book item.- 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("/guest-book-item/{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
-