Interface GroupApi
-
- All Known Implementing Classes:
GroupApi.NotImplemented
public interface GroupApi
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
GroupApi.NotImplemented
A default implementation which allows source compatibility when adding new methods to the interface.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addGroups(String... groups)
Adds subgroups to this group.void
addGroups(List<String> groups)
Adds subgroups to this group.default void
addMembers(String... members)
Add members to a group.void
addMembers(List<String> members)
Add members to a group.List<? extends GroupAuditEventInfo>
auditLog()
Returns the audit log of the group.String
description()
void
description(String description)
Set group decsription.GroupInfo
detail()
GroupInfo
get()
List<GroupInfo>
includedGroups()
Lists the subgroups of this group.void
index()
Reindexes the group.List<AccountInfo>
members()
List group members, non-recursively.List<AccountInfo>
members(boolean recursive)
List group members.String
name()
void
name(String name)
Set group name.GroupOptionsInfo
options()
void
options(GroupOptionsInfo options)
Set group options.GroupInfo
owner()
void
owner(String owner)
Set group owner.default void
removeGroups(String... groups)
Removes subgroups from this group.void
removeGroups(List<String> groups)
Removes subgroups from this group.default void
removeMembers(String... members)
Remove members from a group.void
removeMembers(List<String> members)
Remove members from a group.
-
-
-
Method Detail
-
get
GroupInfo get() throws RestApiException
- Returns:
- group info with no
ListGroupsOption
s set. - Throws:
RestApiException
-
detail
GroupInfo detail() throws RestApiException
- Returns:
- group info with all
ListGroupsOption
s set. - Throws:
RestApiException
-
name
String name() throws RestApiException
- Returns:
- group name.
- Throws:
RestApiException
-
name
void name(String name) throws RestApiException
Set group name.- Parameters:
name
- new name.- Throws:
RestApiException
-
owner
GroupInfo owner() throws RestApiException
- Returns:
- owning group info.
- Throws:
RestApiException
-
owner
void owner(String owner) throws RestApiException
Set group owner.- Parameters:
owner
- identifier of new group owner.- Throws:
RestApiException
-
description
String description() throws RestApiException
- Returns:
- group description.
- Throws:
RestApiException
-
description
void description(String description) throws RestApiException
Set group decsription.- Parameters:
description
- new description.- Throws:
RestApiException
-
options
GroupOptionsInfo options() throws RestApiException
- Returns:
- group options.
- Throws:
RestApiException
-
options
void options(GroupOptionsInfo options) throws RestApiException
Set group options.- Parameters:
options
- new options.- Throws:
RestApiException
-
members
List<AccountInfo> members() throws RestApiException
List group members, non-recursively.- Returns:
- group members.
- Throws:
RestApiException
-
members
List<AccountInfo> members(boolean recursive) throws RestApiException
List group members.- Parameters:
recursive
- whether to recursively included groups.- Returns:
- group members.
- Throws:
RestApiException
-
addMembers
void addMembers(List<String> members) throws RestApiException
Add members to a group.- Parameters:
members
- list of member identifiers, in any format accepted byAccounts.id(String)
- Throws:
RestApiException
-
addMembers
default void addMembers(String... members) throws RestApiException
Add members to a group.- Parameters:
members
- list of member identifiers, in any format accepted byAccounts.id(String)
- Throws:
RestApiException
-
removeMembers
void removeMembers(List<String> members) throws RestApiException
Remove members from a group.- Parameters:
members
- list of member identifiers, in any format accepted byAccounts.id(String)
- Throws:
RestApiException
-
removeMembers
default void removeMembers(String... members) throws RestApiException
Remove members from a group.- Parameters:
members
- list of member identifiers, in any format accepted byAccounts.id(String)
- Throws:
RestApiException
-
includedGroups
List<GroupInfo> includedGroups() throws RestApiException
Lists the subgroups of this group.- Returns:
- the found subgroups
- Throws:
RestApiException
-
addGroups
void addGroups(List<String> groups) throws RestApiException
Adds subgroups to this group.- Parameters:
groups
- list of group identifiers, in any format accepted byGroups.id(String)
- Throws:
RestApiException
-
addGroups
default void addGroups(String... groups) throws RestApiException
Adds subgroups to this group.- Parameters:
groups
- list of group identifiers, in any format accepted byGroups.id(String)
- Throws:
RestApiException
-
removeGroups
void removeGroups(List<String> groups) throws RestApiException
Removes subgroups from this group.- Parameters:
groups
- list of group identifiers, in any format accepted byGroups.id(String)
- Throws:
RestApiException
-
removeGroups
default void removeGroups(String... groups) throws RestApiException
Removes subgroups from this group.- Parameters:
groups
- list of group identifiers, in any format accepted byGroups.id(String)
- Throws:
RestApiException
-
auditLog
List<? extends GroupAuditEventInfo> auditLog() throws RestApiException
Returns the audit log of the group.- Returns:
- list of audit events of the group.
- Throws:
RestApiException
-
index
void index() throws RestApiException
Reindexes the group.Only supported for internal groups.
- Throws:
RestApiException
-
-