Class GroupService
java.lang.Object
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(String, List).
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()));
-
Constructor Summary
ConstructorsConstructorDescriptionGroupService(Tm1Session session) A service sending its requests throughsession. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Group> POST Groups: creates an empty group.reactor.core.publisher.Mono<Void> DELETE Groups('name'): deletes the group; its users stay, without it.reactor.core.publisher.Mono<Group> get(String name, ODataQuery query) GET Groups('name').reactor.core.publisher.Flux<Group> list(ODataQuery query) GET Groups, streamed.reactor.core.publisher.Flux<User> users(String name, ODataQuery query) GET Groups('name')/Users, streamed.
-
Constructor Details
-
GroupService
A service sending its requests throughsession.- Parameters:
session- the session
-
-
Method Details
-
list
GET Groups, streamed.- Parameters:
query- what to select, expand, filter and order- Returns:
- the groups
-
get
@Tm1Endpoint("EntitySet Groups") public reactor.core.publisher.Mono<Group> get(String name, ODataQuery query) GET Groups('name').- Parameters:
name- the group's namequery- what to select and expand- Returns:
- the group, or a
Tm1NotFoundExceptionif there's none
-
create
POST Groups: creates an empty group.- Parameters:
name- the group's name- Returns:
- the group as created
-
delete
DELETE Groups('name'): deletes the group; its users stay, without it.- Parameters:
name- the group's name- Returns:
- completes when the group is deleted
-
users
@Tm1Endpoint("Navigation Group/Users") public reactor.core.publisher.Flux<User> users(String name, ODataQuery query) GET Groups('name')/Users, streamed.- Parameters:
name- the group's namequery- what to select- Returns:
- the group's users
-