@Path(value="/user") public interface UserResource extends AuthenticatedResource
Modifier and Type | Method and Description |
---|---|
GenericResponse |
deleteUserData(String key)
Delete the user data for the given key
|
UserDataResponse |
getAllUserData()
Get complete user data
|
UserLoadResponse |
getMe(boolean groups)
Get the current user (me)
By default, the user's groups are not returned.
|
UserDataResponse |
getUserData(String key)
Get user data for the given key
|
UserListResponse |
list(Integer skipCount,
Integer maxItems,
List<Integer> ids,
List<String> logins,
List<String> firstNames,
List<String> lastNames,
List<String> eMails,
List<Integer> groupIds,
String search,
UserSortAttribute sortBy,
SortOrder sortOrder,
boolean addGroups)
Get a list of users, optionally filtered, sorted and paged
|
GenericResponse |
save(Integer id,
UserSaveRequest request)
Saves the user into GCN.
|
GenericResponse |
saveUserData(String key,
com.fasterxml.jackson.databind.JsonNode jsonData)
Save user data for the given key
|
setSessionId
@GET @Path(value="/me") UserLoadResponse getMe(@QueryParam(value="groups") @DefaultValue(value="false") boolean groups)
groups
- Whether to list the user's groups@GET @Path(value="/list") UserListResponse list(@QueryParam(value="skipCount") @DefaultValue(value="0") Integer skipCount, @QueryParam(value="maxItems") @DefaultValue(value="-1") Integer maxItems, @QueryParam(value="id") List<Integer> ids, @QueryParam(value="login") List<String> logins, @QueryParam(value="firstname") List<String> firstNames, @QueryParam(value="lastname") List<String> lastNames, @QueryParam(value="email") List<String> eMails, @QueryParam(value="group") List<Integer> groupIds, @QueryParam(value="search") String search, @QueryParam(value="sortby") UserSortAttribute sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") SortOrder sortOrder, @QueryParam(value="groups") @DefaultValue(value="false") boolean addGroups)
skipCount
- number of elements to be skipped (paging)maxItems
- maximum number of elements returned (paging)ids
- id(s) for filteringlogins
- login string(s) for filteringfirstNames
- firstname string(s) for filteringlastNames
- lastname string(s) for filteringeMails
- email string(s) for filteringgroupIds
- group id(s) for filteringsearch
- additionally search in users logins, firstNames, lastNames and
emailssortBy
- name of an attribute to sortsortOrder
- sort orderaddGroups
- true to add groups to the users, false (default) otherwise@POST @Path(value="/save/{id}") GenericResponse save(@PathParam(value="id") Integer id, UserSaveRequest request)
id
- Id of the user to save.request
- user save request@POST @Path(value="/me/data/{key}") @Consumes(value="application/json") @Produces(value="application/json") GenericResponse saveUserData(@PathParam(value="key") String key, com.fasterxml.jackson.databind.JsonNode jsonData)
key
- key of the user data to savejsonData
- user data in JSON format@GET @Path(value="/me/data/{key}") @Produces(value="application/json") UserDataResponse getUserData(@PathParam(value="key") String key)
key
- key of the user data@DELETE @Path(value="/me/data/{key}") @Produces(value="application/json") GenericResponse deleteUserData(@PathParam(value="key") String key)
key
- key of the user data@GET @Path(value="/me/data") @Produces(value="application/json") UserDataResponse getAllUserData()
Copyright © 2019 Gentics Software. All rights reserved.