Package google.registry.groups
Interface GroupsConnection
- All Known Implementing Classes:
DirectoryGroupsConnection
public interface GroupsConnection
Interface for common operations on Groups.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The role of a member in a group. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMemberToGroup
(String groupKey, String email, GroupsConnection.Role role) Adds a member to the specified group with the given role.com.google.api.services.directory.model.Group
createGroup
(String groupKey) Creates a group with the given email address (groupKey) that is open for external members to join, and returns it.getMembersOfGroup
(String groupKey) Returns all of the members of the specified group.boolean
isMemberOfGroup
(String memberEmail, String groupKey) Checks whether the given email belongs to the "support" group.void
removeMemberFromGroup
(String groupKey, String email) Removes a member from the specified group, or throwsGoogleJsonResponseException
if the member doesn't exist.
-
Method Details
-
addMemberToGroup
Adds a member to the specified group with the given role. This function is idempotent; if the member already exists in the group, then it returns normally. If the group doesn't exist, then it is created.- Throws:
IOException
-
removeMemberFromGroup
Removes a member from the specified group, or throwsGoogleJsonResponseException
if the member doesn't exist.- Throws:
IOException
-
getMembersOfGroup
Returns all of the members of the specified group. Note that it gets members only; not owners or managers. Returns an empty set if the group in question does not exist.- Throws:
IOException
-
createGroup
Creates a group with the given email address (groupKey) that is open for external members to join, and returns it. This function is idempotent; if the given group already exists, then this function returns as normal without error (and without modifying the existing group in any way, including permissions on who is able to join). The configured admin owner for the Google App is automatically added as an owner.- Throws:
IOException
-
isMemberOfGroup
Checks whether the given email belongs to the "support" group.
-