Package org.ctan.site.resources.admin
Class Stopword3Resource
java.lang.Object
org.ctan.site.resources.admin.Stopword3Resource
@Path("/3.0/admin")
@Produces("application/json")
@RolesAllowed("ADMIN")
public class Stopword3Resource
extends Object
The class
Stopword3Resource
contains the CRUD controller for the
guest book black list resource.-
Constructor Summary
ConstructorsConstructorDescriptionStopword3Resource
(@NonNull StopwordStore store) This is the constructor for the classStopword3Resource
. -
Method Summary
Modifier and TypeMethodDescriptionThe methodcreate
provides an end-point to create a stop word.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 stop word.
-
Constructor Details
-
Stopword3Resource
This is the constructor for the classStopword3Resource
.- Parameters:
store
- the underlying store
-
-
Method Details
-
create
@POST @Path("/stopword") @UnitOfWork("siteDb") public Stopword create(@NonNull @NonNull Stopword stopword) The methodcreate
provides an end-point to create a stop word.- Parameters:
stopword
- the stop word object to store- Returns:
- the updated stopword
-
get
@GET @Path("/stopword/{id}") @UnitOfWork("siteDb") public Stopword 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("/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("/stopword/{id}") @UnitOfWork("siteDb") public boolean remove(@NonNull @PathParam("id") @NonNull Long id) The methodremove
provides an end-point to remove a stop word.- Parameters:
id
- the id- Returns:
true
iff the user has existed
-