public class Groups extends Object
Modifier and Type | Method and Description |
---|---|
UserGroup |
addGroup(UserGroup userGroup)
Adds group to the list of groups for current user
|
Results<UserGroup> |
get(GroupType groupType,
int offset,
int limit) |
Results<UserGroup> |
get(long userId)
Retrieves groups that user is either a member of.
|
UserGroup |
getGroupMembers(long groupId)
Retrieves both local and remote members of the specified group if the user making the request
has the appropriate permissions
|
List<UserGroup> |
getMatchingGroups(String token,
int limit) |
protected void |
setGroupMembers(Group group,
List<AccountTransfer> members,
List<RemoteUser> remoteUsers) |
boolean |
update(long groupId,
UserGroup userGroup) |
public Groups(String userId)
public Results<UserGroup> get(long userId)
userId
- id of account whose groups are being requestedpublic UserGroup addGroup(UserGroup userGroup)
userGroup
- information about group to be added, including members (local and remote)public UserGroup getGroupMembers(long groupId)
groupId
- unique local identifier of groupPermissionException
- if the user does not have read permissionspublic boolean update(long groupId, UserGroup userGroup)
protected void setGroupMembers(Group group, List<AccountTransfer> members, List<RemoteUser> remoteUsers)
Copyright © 2017. All rights reserved.