use of org.apache.jackrabbit.oak.spi.security.authentication.external.SyncResult in project jackrabbit-oak by apache.
the class Delegatee method syncAllUsers.
/**
* @see SynchronizationMBean#syncAllUsers(boolean)
*/
@Nonnull
String[] syncAllUsers(boolean purge) {
try {
List<String> list = new ArrayList<String>();
context.setKeepMissing(!purge).setForceGroupSync(true).setForceUserSync(true);
Iterator<SyncedIdentity> it = handler.listIdentities(userMgr);
List<SyncResult> results = new ArrayList<SyncResult>(batchSize);
while (it.hasNext()) {
SyncedIdentity id = it.next();
if (isMyIDP(id)) {
results = syncUser(id.getId(), false, results, list);
}
}
commit(list, results, NO_BATCH_SIZE);
return list.toArray(new String[list.size()]);
} catch (RepositoryException e) {
throw new IllegalStateException("Error retrieving users for syncing", e);
}
}
Aggregations