Interface GroupResource
-
@Path("/group") public interface GroupResource
Resource to get groups
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description GroupLoadResponse
add(String id, Group group)
Create subgroupUserLoadResponse
addUser(String id, String userId)
Add existing user to the given groupUserLoadResponse
createUser(String id, User user)
Create user in the given groupjavax.ws.rs.core.Response
delete(String id)
Delete a groupGroupLoadResponse
get(String id)
Load group with given IDTypePermissionResponse
getInstancePerms(String id, String type, Integer instanceId)
Get instance permissions for a groupTypePermissionList
getPerms(String id, String parentType, Integer parentId, Integer channelId)
Get permissions set for a group.TypePermissionResponse
getTypePerms(String id, String type)
Get type permissions for a groupGroupList
list(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms)
List groups.
The result can be filtered byid
name
description
and sorted byid
name
description
GroupsResponse
list(Integer skipCount, Integer maxItems, List<Integer> ids, List<String> names, List<String> memberLogins, List<Integer> memberIds, List<Integer> childGroupIds, List<Integer> privFolderIds, List<Privilege> privileges, GroupReduceType reduce, GroupSortAttribute sortBy, SortOrder sortOrder, PermsParameterBean perms)
Deprecated.because new endpoint exists.GroupsResponse
load(PermsParameterBean perms)
Load the groups the user may seeGroupLoadResponse
move(String id, String subgroupId)
Move subgroupjavax.ws.rs.core.Response
removeUser(String id, String userId)
Remove user from a groupGenericResponse
setInstancePerms(String id, String type, Integer instanceId, long waitMs, TypePermissionRequest request)
Set instance permissions for a groupGenericResponse
setTypePerms(String id, String type, long waitMs, TypePermissionRequest request)
Set type permissions for a groupGroupList
subgroups(String id, FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms)
List subgroups of the given group.
The result can be filtered byid
name
description
and sorted byid
name
description
GroupLoadResponse
update(String id, Group group)
Update a groupUserList
users(String id, FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms, EmbedParameterBean embed)
List users of given group.
The result can be filtered byid
login
firstName
lastName
email
and sorted byid
login
firstName
lastName
email
-
-
-
Method Detail
-
load
@GET @Path("/load") GroupsResponse load(@BeanParam PermsParameterBean perms)
Load the groups the user may see- Parameters:
perms
- permissions parameters- Returns:
- response containing groups
-
list
@GET @Path("/list") @Deprecated GroupsResponse list(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("id") List<Integer> ids, @QueryParam("name") List<String> names, @QueryParam("memberlogin") List<String> memberLogins, @QueryParam("memberid") List<Integer> memberIds, @QueryParam("children") List<Integer> childGroupIds, @QueryParam("folder") List<Integer> privFolderIds, @QueryParam("privileges") List<Privilege> privileges, @QueryParam("reduce") GroupReduceType reduce, @QueryParam("sortby") GroupSortAttribute sortBy, @QueryParam("sortorder") @DefaultValue("asc") SortOrder sortOrder, @BeanParam PermsParameterBean perms)
Deprecated.because new endpoint exists. uselist(FilterParameterBean, SortParameterBean, PagingParameterBean, PermsParameterBean)
insteadGet a list of groups, optionally filtered sorted and paged.- Parameters:
skipCount
- number of groups skipped in the list (paging)maxItems
- maximum number of groups returned (paging)ids
- id of the group to return (filter)names
- name or name pattern of the group(s) to return (filter)memberLogins
- login name of the group member for the group(s) to return (filter)memberIds
- id of the group member for the group(s) to return (filter)childGroupIds
- ids of child groups for the group(s) to return (filter)privFolderIds
- ids of folders for filtering by folder permissions (together with "privileges")privileges
- list of privileges for filtering by folder permissions (together with "folder")reduce
- if set, the list of groups will be reduced: for nested groups, only parent group(s) or child group(s) will be returnedsortBy
- name of the sorted attribute (sorting)sortOrder
- sortorder (sorting)perms
- permissions parameters- Returns:
- response containing the groups
-
list
@GET GroupList list(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
List groups.
The result can be filtered byid
name
description
id
name
description
- Parameters:
filter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parameters- Returns:
- list of groups
- Throws:
Exception
-
get
@GET @Path("/{id}") GroupLoadResponse get(@PathParam("id") String id) throws Exception
Load group with given ID- Parameters:
id
- local group ID- Returns:
- group response
- Throws:
Exception
-
subgroups
@GET @Path("/{id}/groups") GroupList subgroups(@PathParam("id") String id, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
List subgroups of the given group.
The result can be filtered byid
name
description
id
name
description
- Parameters:
id
- local group IDfilter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parameters- Returns:
- list of subgroups
- Throws:
Exception
-
add
@PUT @Path("/{id}/groups") GroupLoadResponse add(@PathParam("id") String id, Group group) throws Exception
Create subgroup- Parameters:
id
- local group IDgroup
- group- Returns:
- created group
- Throws:
Exception
-
move
@PUT @Path("/{id}/groups/{subgroupId}") GroupLoadResponse move(@PathParam("id") String id, @PathParam("subgroupId") String subgroupId) throws Exception
Move subgroup- Parameters:
id
- local mother group IDgroup
- group- Returns:
- created group
- Throws:
Exception
-
delete
@DELETE @Path("/{id}") javax.ws.rs.core.Response delete(@PathParam("id") String id) throws Exception
Delete a group- Parameters:
id
- local group ID- Returns:
- empty response
- Throws:
Exception
-
update
@POST @Path("/{id}") GroupLoadResponse update(@PathParam("id") String id, Group group) throws Exception
Update a group- Parameters:
id
- local group IDgroup
- new group data- Returns:
- updated group
- Throws:
Exception
-
users
@GET @Path("/{id}/users") UserList users(@PathParam("id") String id, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms, @BeanParam EmbedParameterBean embed) throws Exception
List users of given group.
The result can be filtered byid
login
firstName
lastName
email
id
login
firstName
lastName
email
- Parameters:
id
- local group IDfilter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parametersembed
- optionally embed the referenced objects (group)- Returns:
- list of group members
- Throws:
Exception
-
createUser
@PUT @Path("/{id}/users") UserLoadResponse createUser(@PathParam("id") String id, User user) throws Exception
Create user in the given group- Parameters:
id
- local group IDuser
- user to create- Returns:
- created user
- Throws:
Exception
-
addUser
@PUT @Path("/{id}/users/{userId}") UserLoadResponse addUser(@PathParam("id") String id, @PathParam("userId") String userId) throws Exception
Add existing user to the given group- Parameters:
id
- local group IDuserId
- local user ID- Returns:
- user
- Throws:
Exception
-
removeUser
@DELETE @Path("/{id}/users/{userId}") javax.ws.rs.core.Response removeUser(@PathParam("id") String id, @PathParam("userId") String userId) throws Exception
Remove user from a group- Parameters:
id
- local group IDuserId
- local user ID- Returns:
- empty response
- Throws:
Exception
-
getPerms
@GET @Path("/{id}/perms") TypePermissionList getPerms(@PathParam("id") String id, @QueryParam("parentType") String parentType, @QueryParam("parentId") Integer parentId, @QueryParam("channelId") Integer channelId) throws Exception
Get permissions set for a group. If no parentType is given, only root-level permissions will be returned. Otherwise, the permissions on child types/instances of the given parentType/parentId will be returned.- Parameters:
id
- group IDparentType
- optional parent typeparentId
- optional parent IDchannelId
- optional channel ID- Returns:
- Permissions response
- Throws:
Exception
-
getTypePerms
@GET @Path("/{id}/perms/{type}") TypePermissionResponse getTypePerms(@PathParam("id") String id, @PathParam("type") String type) throws Exception
Get type permissions for a group- Parameters:
id
- group IDtype
- type- Returns:
- Permissions response
- Throws:
Exception
-
setTypePerms
@POST @Path("/{id}/perms/{type}") GenericResponse setTypePerms(@PathParam("id") String id, @PathParam("type") String type, @QueryParam("wait") @DefaultValue("0") long waitMs, TypePermissionRequest request) throws Exception
Set type permissions for a group- Parameters:
id
- group IDtype
- typewaitMs
- wait timeout in millisecondsrequest
- request- Returns:
- response
- Throws:
Exception
-
getInstancePerms
@GET @Path("/{id}/perms/{type}/{instanceId}") TypePermissionResponse getInstancePerms(@PathParam("id") String id, @PathParam("type") String type, @PathParam("instanceId") Integer instanceId) throws Exception
Get instance permissions for a group- Parameters:
id
- group IDtype
- typeinstanceId
- instance ID- Returns:
- Permissions response
- Throws:
Exception
-
setInstancePerms
@POST @Path("/{id}/perms/{type}/{instanceId}") GenericResponse setInstancePerms(@PathParam("id") String id, @PathParam("type") String type, @PathParam("instanceId") Integer instanceId, @QueryParam("wait") @DefaultValue("0") long waitMs, TypePermissionRequest request) throws Exception
Set instance permissions for a group- Parameters:
id
- group IDtype
- typeinstanceId
- instance IDwaitMs
- wait timeout in millisecondsrequest
- request- Returns:
- response
- Throws:
Exception
-
-