public final class SetRoles extends UpdateActionImpl<State>
See also StateUpdateCommand.
withUpdateableState(client(), builder -> builder.type(StateType.REVIEW_STATE), state -> {
final Set<StateRole> roles = asSet(REVIEW_INCLUDED_IN_STATISTICS);
final StateUpdateCommand command = StateUpdateCommand.of(state, SetRoles.of(roles));
final State updatedState = client().executeBlocking(command);
assertThat(updatedState.getRoles()).isEqualTo(roles);
return updatedState;
});
See the test code.
Modifier and Type | Method and Description |
---|---|
Set<StateRole> |
getRoles() |
static SetRoles |
of(Set<StateRole> roles) |
getAction