@Path(value="/group")
public interface GroupResource
Modifier and Type | Method and Description |
---|---|
GroupLoadResponse |
add(String id,
Group group)
Create subgroup
|
UserLoadResponse |
addUser(String id,
String userId)
Add existing user to the given group
|
UserLoadResponse |
createUser(String id,
User user)
Create user in the given group
|
javax.ws.rs.core.Response |
delete(String id)
Delete a group
|
GroupLoadResponse |
get(String id)
Load group with given ID
|
TypePermissionResponse |
getInstancePerms(String id,
String type,
Integer instanceId)
Get instance permissions for a group
|
TypePermissionList |
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 group
|
GroupList |
list(FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
PermsParameterBean perms)
List groups.
The result can be filtered by id
name
description
and sorted by
id
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)
Get a list of groups, optionally filtered sorted and paged.
|
GroupsResponse |
load(PermsParameterBean perms)
Load the groups the user may see
|
GroupLoadResponse |
move(String id,
String subgroupId)
Move subgroup
|
javax.ws.rs.core.Response |
removeUser(String id,
String userId)
Remove user from a group
|
GenericResponse |
setInstancePerms(String id,
String type,
Integer instanceId,
long waitMs,
TypePermissionRequest request)
Set instance permissions for a group
|
GenericResponse |
setTypePerms(String id,
String type,
long waitMs,
TypePermissionRequest request)
Set type permissions for a group
|
GroupList |
subgroups(String id,
FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
PermsParameterBean perms)
List subgroups of the given group.
The result can be filtered by id
name
description
and sorted by
id
name
description
|
GroupLoadResponse |
update(String id,
Group group)
Update a group
|
UserList |
users(String id,
FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
PermsParameterBean perms)
List users of given group.
The result can be filtered by id
login
firstName
lastName
email
and sorted by
id
login
firstName
lastName
email
|
@GET @Path(value="/load") GroupsResponse load(@BeanParam PermsParameterBean perms)
perms
- permissions parameters@GET @Path(value="/list") GroupsResponse 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="name") List<String> names, @QueryParam(value="memberlogin") List<String> memberLogins, @QueryParam(value="memberid") List<Integer> memberIds, @QueryParam(value="children") List<Integer> childGroupIds, @QueryParam(value="folder") List<Integer> privFolderIds, @QueryParam(value="privileges") List<Privilege> privileges, @QueryParam(value="reduce") GroupReduceType reduce, @QueryParam(value="sortby") GroupSortAttribute sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") SortOrder sortOrder, @BeanParam PermsParameterBean perms)
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@GET GroupList list(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
id
name
description
id
name
description
filter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parametersException
@GET @Path(value="/{id}") GroupLoadResponse get(@PathParam(value="id") String id) throws Exception
id
- local group IDException
@GET @Path(value="/{id}/groups") GroupList subgroups(@PathParam(value="id") String id, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
id
name
description
id
name
description
id
- local group IDfilter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parametersException
@PUT @Path(value="/{id}/groups") GroupLoadResponse add(@PathParam(value="id") String id, Group group) throws Exception
id
- local group IDgroup
- groupException
@PUT @Path(value="/{id}/groups/{subgroupId}") GroupLoadResponse move(@PathParam(value="id") String id, @PathParam(value="subgroupId") String subgroupId) throws Exception
id
- local mother group IDgroup
- groupException
@DELETE @Path(value="/{id}") javax.ws.rs.core.Response delete(@PathParam(value="id") String id) throws Exception
id
- local group IDException
@POST @Path(value="/{id}") GroupLoadResponse update(@PathParam(value="id") String id, Group group) throws Exception
id
- local group IDgroup
- new group dataException
@GET @Path(value="/{id}/users") UserList users(@PathParam(value="id") String id, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
id
login
firstName
lastName
email
id
login
firstName
lastName
email
id
- local group IDfilter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parametersException
@PUT @Path(value="/{id}/users") UserLoadResponse createUser(@PathParam(value="id") String id, User user) throws Exception
id
- local group IDuser
- user to createException
@PUT @Path(value="/{id}/users/{userId}") UserLoadResponse addUser(@PathParam(value="id") String id, @PathParam(value="userId") String userId) throws Exception
id
- local group IDuserId
- local user IDException
@DELETE @Path(value="/{id}/users/{userId}") javax.ws.rs.core.Response removeUser(@PathParam(value="id") String id, @PathParam(value="userId") String userId) throws Exception
id
- local group IDuserId
- local user IDException
@GET @Path(value="/{id}/perms") TypePermissionList getPerms(@PathParam(value="id") String id, @QueryParam(value="parentType") String parentType, @QueryParam(value="parentId") Integer parentId, @QueryParam(value="channelId") Integer channelId) throws Exception
id
- group IDparentType
- optional parent typeparentId
- optional parent IDchannelId
- optional channel IDException
@GET @Path(value="/{id}/perms/{type}") TypePermissionResponse getTypePerms(@PathParam(value="id") String id, @PathParam(value="type") String type) throws Exception
id
- group IDtype
- typeException
@POST @Path(value="/{id}/perms/{type}") GenericResponse setTypePerms(@PathParam(value="id") String id, @PathParam(value="type") String type, @QueryParam(value="wait") @DefaultValue(value="0") long waitMs, TypePermissionRequest request) throws Exception
id
- group IDtype
- typewaitMs
- wait timeout in millisecondsrequest
- requestException
@GET @Path(value="/{id}/perms/{type}/{instanceId}") TypePermissionResponse getInstancePerms(@PathParam(value="id") String id, @PathParam(value="type") String type, @PathParam(value="instanceId") Integer instanceId) throws Exception
id
- group IDtype
- typeinstanceId
- instance IDException
@POST @Path(value="/{id}/perms/{type}/{instanceId}") GenericResponse setInstancePerms(@PathParam(value="id") String id, @PathParam(value="type") String type, @PathParam(value="instanceId") Integer instanceId, @QueryParam(value="wait") @DefaultValue(value="0") long waitMs, TypePermissionRequest request) throws Exception
id
- group IDtype
- typeinstanceId
- instance IDwaitMs
- wait timeout in millisecondsrequest
- requestException
Copyright © 2024 Gentics Software. All rights reserved.