Class Message3Resource

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

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

    • Message3Resource

      public Message3Resource(@NonNull @NonNull MessageStore store)
      This is the constructor for the class CrudUser3Resource.
      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 method retrieve provides 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 method list provides means to retrieve a page of messages.
      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 messages or null
    • remove

      @DELETE @Path("/message/{id}") @PermitAll @UnitOfWork("siteDb") public boolean remove(@NonNull @PathParam("id") @NonNull Long id)
      The method remove provides 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 method save provides an end-point to create a message.
      Parameters:
      message - the object to store
      Returns:
      the updated entity