use of com.sequenceiq.freeipa.client.operation.UserAddOperation in project cloudbreak by hortonworks.
the class UserSyncService method addUsers.
void addUsers(boolean fmsToFreeipaBatchCallEnabled, FreeIpaClient freeIpaClient, Set<FmsUser> fmsUsers, BiConsumer<String, String> warnings) throws FreeIpaClientException {
List<UserAddOperation> operations = Lists.newArrayList();
for (FmsUser fmsUser : fmsUsers) {
operations.add(UserAddOperation.create(fmsUser.getName(), fmsUser.getFirstName(), fmsUser.getLastName(), fmsUser.getState() == FmsUser.State.DISABLED));
}
invokeOperation(operations, fmsToFreeipaBatchCallEnabled, freeIpaClient, warnings, Set.of(FreeIpaErrorCodes.DUPLICATE_ENTRY), true);
}
use of com.sequenceiq.freeipa.client.operation.UserAddOperation in project cloudbreak by hortonworks.
the class UserSyncOperations method addUsers.
public void addUsers(boolean fmsToFreeipaBatchCallEnabled, FreeIpaClient freeIpaClient, Set<FmsUser> fmsUsers, BiConsumer<String, String> warnings) throws FreeIpaClientException, TimeoutException {
List<UserAddOperation> operations = Lists.newArrayList();
for (FmsUser fmsUser : fmsUsers) {
threadInterruptChecker.throwTimeoutExIfInterrupted();
operations.add(UserAddOperation.create(fmsUser.getName(), fmsUser.getFirstName(), fmsUser.getLastName(), fmsUser.getState() == FmsUser.State.DISABLED));
}
invokeOperation(operations, fmsToFreeipaBatchCallEnabled, freeIpaClient, warnings, Set.of(FreeIpaErrorCodes.DUPLICATE_ENTRY), true);
}
Aggregations