Identity Manager supports the Bulk capabilities described in the following table.
Table 2–5 Bulk Capabilities|
Capability |
Description |
OperationalAttributes |
|---|---|---|
|
BulkDeleteRequest |
Executes a bulk delete of PSOs. |
None |
|
BulkModifyRequest |
Executes a bulk modify of matching PSOs. |
None |
The following example bulk deletes all users with the lastname Aurelius.
SessionAwareSpml2Client client = new SessionAwareSpml2Client("http://example.com:8080/
idm/servlet/openspml2");
ListTargetsResponse loginInfo = client.login("Configurator", "configurator");
BulkDeleteRequest req = new BulkDeleteRequest();
Substrings term = new Substrings();
term.setName("lastname");
term.setInitial(new DSMLValue("Aurelius"));
Filter filter = new Filter(term);
Query q = new Query();
q.setScope(Scope.ONELEVEL);
q.addQueryClause(filter);
req.setExecutionMode(ExecutionMode.SYNCHRONOUS);
req.setQuery(q);
BulkDeleteResponse res = (BulkDeleteResponse) client.send(req);
if (res.getStatus().equals(StatusCode.SUCCESS)) {
System.out.println("Successfully performed bulk delete operation.");
}