Class UserStopword3Resource

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

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

    • UserStopword3Resource

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

    • create

      @POST @Path("/user-stopword") @UnitOfWork("siteDb") public UserStopword create(@NonNull @NonNull UserStopword stopword)
      The method create provides an end-point to create a user.
      Parameters:
      stopword - the user object to store
      Returns:
      the updated entity
    • get

      @GET @Path("/user-stopword/{id}") @UnitOfWork("siteDb") public UserStopword get(@NonNull @PathParam("id") @NonNull Long id)
      The method retrieve provides means to retrieve a stop word.
      Parameters:
      id - the id
      Returns:
      true iff the user exists
    • list

      @GET @Path("/user-stopwords") @UnitOfWork("siteDb") public GeneralPage list(@QueryParam("q") String q, @QueryParam("page") int page, @QueryParam("size") int size, @QueryParam("order") String orderBy, @QueryParam("asc") boolean asc)
      The method list provides means to retrieve a page of stop words.
      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("/user-stopword/{id}") @UnitOfWork("siteDb") public boolean remove(@NonNull @PathParam("id") @NonNull Long id)
      The method remove provides an end-point to remove a user.
      Parameters:
      id - the id
      Returns:
      true iff the user has existed
    • retrieve

      @GET @Path("/user-stopword/by-word/{stopword}") @UnitOfWork("siteDb") public UserStopword retrieve(@NonNull @PathParam("stopword") @NonNull String stopword)
      The method retrieve provides means to retrieve a user.
      Parameters:
      stopword - the stop word
      Returns:
      true iff the user exists
    • set

      @PUT @Path("/user-stopword/{id}") @UnitOfWork("siteDb") public boolean set(@NonNull @PathParam("id") @NonNull Long id, @NonNull @NonNull String value)
      The method set provides means to reset a single stop word.
      Parameters:
      id - the id of the stopword
      value - the new value
      Returns:
      true iff the setting has succeeded