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 methodcreate
provides an end-point to create a guest book item.The methodget
provides an end-point to get a guest book item.The methodlist
provides means to retrieve a page of guest book item.boolean
remove
(long id) The methodremove
provides 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 methodcreate
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 methodget
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 methodlist
provides 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 methodremove
provides an end-point to remove a ticket.- Parameters:
id
- the id- Returns:
true
iff the user has existed
-