@Path(value="/user") @ScopesAllowed(value={"kangaroo:user","kangaroo:user_admin"}) public final class UserService extends AbstractService
| Constructor and Description |
|---|
UserService() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
browse(int offset,
int limit,
String sort,
SortOrder order,
BigInteger ownerId,
BigInteger applicationId,
BigInteger roleId)
Returns a list of all users.
|
javax.ws.rs.core.Response |
createResource(User user)
Create an user.
|
javax.ws.rs.core.Response |
deleteResource(BigInteger id)
Delete a user.
|
protected String |
getAccessScope()
The access scope required as a regular user.
|
protected String |
getAdminScope()
The access scope required as an admin.
|
javax.ws.rs.core.Response |
getResource(BigInteger id)
Returns a specific user.
|
javax.ws.rs.core.Response |
searchUsers(Integer offset,
Integer limit,
String queryString,
BigInteger ownerId,
BigInteger applicationId,
BigInteger roleId)
Search the users in the system.
|
javax.ws.rs.core.Response |
updateResource(BigInteger id,
User user)
Update an user.
|
assertCanAccess, assertCanAccessSubresource, executeQuery, getAdminApplication, getConfig, getCurrentUser, getFullTextSession, getInjector, getSearchFactory, getSecurityContext, getSession, getUriInfo, requireEntityInput, resolveEntityInput, resolveEntityInput, resolveFilterEntity, resolveOwnershipFilter, setConfig, setFullTextSession, setInjector, setSearchFactory, setSecurityContext, setSession, setUriInfo@GET
@Path(value="/search")
@Produces(value="application/json")
public javax.ws.rs.core.Response searchUsers(@DefaultValue(value="0") @QueryParam(value="offset")
Integer offset,
@DefaultValue(value="10") @QueryParam(value="limit")
Integer limit,
@DefaultValue(value="") @QueryParam(value="q")
String queryString,
@Optional @QueryParam(value="owner")
BigInteger ownerId,
@Optional @QueryParam(value="application")
BigInteger applicationId,
@Optional @QueryParam(value="role")
BigInteger roleId)
offset - The offset of the first users to fetch.limit - The number of data sets to fetch.queryString - The search term for the query.ownerId - An optional user ID to filter by.applicationId - An optional application ID to filter by.roleId - An optional role ID to filter by.@GET
@Produces(value="application/json")
public javax.ws.rs.core.Response browse(@QueryParam(value="offset") @DefaultValue(value="0")
int offset,
@QueryParam(value="limit") @DefaultValue(value="10")
int limit,
@QueryParam(value="sort") @DefaultValue(value="createdDate")
String sort,
@QueryParam(value="order") @DefaultValue(value="ASC")
SortOrder order,
@Optional @QueryParam(value="owner")
BigInteger ownerId,
@Optional @QueryParam(value="application")
BigInteger applicationId,
@Optional @QueryParam(value="role")
BigInteger roleId)
offset - Paging offset, in records.limit - The number of records to return.sort - The field on which the records should be sorted.order - The sort order, ASC or DESC.ownerId - An optional user ID to filter by.applicationId - An optional application ID to filter by.roleId - An optional role ID to filter by.@GET
@Path(value="/{id: [a-f0-9]{32}}")
@Produces(value="application/json")
public javax.ws.rs.core.Response getResource(@PathParam(value="id")
BigInteger id)
id - The Unique Identifier for the user.@POST @Consumes(value="application/json") public javax.ws.rs.core.Response createResource(User user)
user - The user to create.@PUT
@Path(value="/{id: [a-f0-9]{32}}")
@Consumes(value="application/json")
@Produces(value="application/json")
public javax.ws.rs.core.Response updateResource(@PathParam(value="id")
BigInteger id,
User user)
id - The Unique Identifier for the user.user - The user to update.@DELETE
@Path(value="/{id: [a-f0-9]{32}}")
public javax.ws.rs.core.Response deleteResource(@PathParam(value="id")
BigInteger id)
id - The Unique Identifier for the user.protected String getAdminScope()
getAdminScope in class AbstractServiceprotected String getAccessScope()
getAccessScope in class AbstractServiceCopyright © 2018 krotscheck.net. All rights reserved.