Package org.ctan.site.resources.admin
Class Message3Resource
java.lang.Object
org.ctan.site.resources.admin.Message3Resource
The class
Message3Resource contains the CRUD controller for the
message resource.-
Constructor Summary
ConstructorsConstructorDescriptionMessage3Resource(@NonNull MessageStore store) This is the constructor for the classCrudUser3Resource. -
Method Summary
Modifier and TypeMethodDescriptionThe methodretrieveprovides means to retrieve a message.The methodlistprovides means to retrieve a page of messages.booleanThe methodremoveprovides means to remove a message.The methodsaveprovides an end-point to create a message.
-
Constructor Details
-
Message3Resource
This is the constructor for the classCrudUser3Resource.- Parameters:
store- the underlying store
-
-
Method Details
-
get
@GET @Path("/message/{id}") @PermitAll @UnitOfWork("siteDb") public Message get(@NonNull @PathParam("id") @NonNull Long id) The methodretrieveprovides means to retrieve a message.- Parameters:
id- the id- Returns:
- the object or
null
-
list
@GET @Path("/messages") @PermitAll @UnitOfWork("siteDb") public GeneralPage list(@QueryParam("q") String q, @QueryParam("page") @DefaultValue("0") int page, @QueryParam("size") @DefaultValue("32") int size, @QueryParam("order") String orderBy, @QueryParam("asc") boolean asc) The methodlistprovides means to retrieve a page of messages.- Parameters:
q- the name patternpage- the pagesize- the page sizeorderBy- the orderasc- the indicator for ascending- Returns:
- the page for the messages or
null
-
remove
@DELETE @Path("/message/{id}") @PermitAll @UnitOfWork("siteDb") public boolean remove(@NonNull @PathParam("id") @NonNull Long id) The methodremoveprovides means to remove a message.- Parameters:
id- the id- Returns:
- the indicator whether the entity could have been removed
-
save
@POST @Path("/message") @PermitAll @UnitOfWork("siteDb") public Message save(@NonNull @NonNull Message message) The methodsaveprovides an end-point to create a message.- Parameters:
message- the object to store- Returns:
- the updated entity
-