GroupService
import io.skipcheck.tm1.client.service.security.GroupService; Security groups: /Groups and their users. A user's membership is set from the
user's side, with UserService.setGroups.
List a group's members:
return tm1.groups().users("Planners", ODataQuery.none().select(User.NAME)).map(User::name);
Create a group and add a user to it, from the user's side:
// A new group, then alice added to it, from her side: her groups plus this one
return tm1.groups()
.create("Planners")
.then(tm1.users().groups("alice", ODataQuery.none().select(Group.NAME)).map(Group::name).collectList())
.flatMap(groups -> tm1.users()
.setGroups("alice", Stream.concat(groups.stream(), Stream.of("Planners")).toList()));
Members
GroupService constructor | A service sending its requests through session. |
list | GET Groups, streamed. |
get | GET Groups('name'). |
create | Creates an empty group. |
delete | Deletes the group; its users stay, without it. |
users | GET Groups('name')/Users, streamed. |
GroupService
constructorGroupService(Tm1Session session) A service sending its requests through session.
Parameters
session- the session
list
Flux<Group> list(ODataQuery query) GET Groups, streamed.
Parameters
query- what to select, expand, filter and order
Returns
- the groups
TM1 REST EntitySet Groups
get
Mono<Group> get(String name, ODataQuery query) GET Groups('name').
Parameters
name- the group's name
query- what to select and expand
Returns
- the group, or a
Tm1NotFoundExceptionif there's none
TM1 REST EntitySet Groups
create
Mono<Group> create(String name) POST Groups: creates an empty group.
Parameters
name- the group's name
Returns
- the group as created
TM1 REST EntitySet Groups
delete
Mono<Void> delete(String name) DELETE Groups('name'): deletes the group; its users stay, without it.
Parameters
name- the group's name
Returns
- completes when the group is deleted
TM1 REST EntitySet Groups
users
Flux<User> users(String name, ODataQuery query) GET Groups('name')/Users, streamed.
Parameters
name- the group's name
query- what to select
Returns
- the group's users
TM1 REST Navigation Group/Users
Also in the Javadoc.