Package org.ctan.site.resources.admin
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 Summary
ConstructorsConstructorDescriptionUserStopword3Resource
(@NonNull UserStopwordStore store) This is the constructor for the classCrudUser3Resource
. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(@NonNull UserStopword stopword) The methodcreate
provides an end-point to create a user.The methodretrieve
provides means to retrieve a stop word.The methodlist
provides means to retrieve a page of stop words.boolean
The methodremove
provides an end-point to remove a user.The methodretrieve
provides means to retrieve a user.boolean
The methodset
provides means to reset a single stop word.
-
Constructor Details
-
UserStopword3Resource
This is the constructor for the classCrudUser3Resource
.- Parameters:
store
- the underlying store
-
-
Method Details
-
create
@POST @Path("/user-stopword") @UnitOfWork("siteDb") public UserStopword create(@NonNull @NonNull UserStopword stopword) The methodcreate
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 methodretrieve
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 methodlist
provides means to retrieve a page of stop words.- 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("/user-stopword/{id}") @UnitOfWork("siteDb") public boolean remove(@NonNull @PathParam("id") @NonNull Long id) The methodremove
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 methodretrieve
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 methodset
provides means to reset a single stop word.- Parameters:
id
- the id of the stopwordvalue
- the new value- Returns:
true
iff the setting has succeeded
-