Package org.vrspace.server.core
Class GroupManager
java.lang.Object
org.vrspace.server.core.GroupManager
Manages client group membership and ownership. General workflow when joining
private groups: ask to join, owner allows. OR, invite a member, member
accepts. For public groups, member just joins, though invite/accept should
work. User can leave the group, or get kicked by the owner.
- Author:
- joe
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAccept invitation to a group, either public or privatevoidvoidvoidAllow a client who asked to join a private groupvoidAsk to join a private groupvoidcreateGroup(Client client, UserGroup group) voiddeleteGroup(Client client, UserGroup group) voidgetAttachment(Client recipient, UserGroup group, String messageId, String fileName) getGroupById(Client client, String groupId) getGroupByName(Client client, String name) static GroupManagervoidinit()voidvoidInvite a client to a group.voidJoin a public groupvoidvoidGroup owner can kick another user from the groupvoidLeave a grouplistGroups(Client client) listOwnedGroups(Client client) listOwners(UserGroup group) pendingInvitations(Client member) Any user can list their own pending invitationspendingRequests(UserGroup group, Client member) Group owner can list all pending join requestsvoidremoveOwner(UserGroup group, Client owner) unreadGroups(Client client) unreadMessages(Client client, UserGroup group) updateGroup(Client client, UserGroup group) voidworldInvite(Client sender, UserGroup group, String worldName, String link)
-
Constructor Details
-
GroupManager
public GroupManager()
-
-
Method Details
-
getInstance
-
init
@PostConstruct public void init() -
listGroups
-
listOwnedGroups
-
createGroup
-
updateGroup
-
deleteGroup
-
show
-
invite
-
invite
Invite a client to a group. For private groups, only owners can invite.- Parameters:
group-member-
-
accept
Accept invitation to a group, either public or private- Parameters:
group-member-
-
ask
Ask to join a private group- Parameters:
group-member-
-
allow
-
allow
Allow a client who asked to join a private group- Parameters:
group-member-
-
join
Join a public group- Parameters:
group-member-
-
leave
Leave a group- Parameters:
group-member-
-
kick
-
kick
Group owner can kick another user from the group- Parameters:
group-member-
-
pendingRequests
Group owner can list all pending join requests- Parameters:
group-member-- Returns:
-
pendingInvitations
Any user can list their own pending invitations- Parameters:
member-- Returns:
-
addOwner
-
removeOwner
-
write
-
worldInvite
-
attach
-
detach
-
getAttachment
-
getGroupByName
-
getGroupById
-
getGroup
-
unreadGroups
-
unreadMessages
-
listOwners
-