use of org.wso2.charon3.core.objects.bulk.BulkRequestContent in project charon by wso2.
the class BulkRequestProcessor method processBulkRequests.
public BulkResponseData processBulkRequests(BulkRequestData bulkRequestData) throws BadRequestException {
BulkResponseData bulkResponseData = new BulkResponseData();
SCIMResponse response = null;
for (BulkRequestContent bulkRequestContent : bulkRequestData.getUserOperationRequests()) {
if (failOnError == 0) {
bulkResponseData.addUserOperation(getBulkResponseContent(bulkRequestContent, userResourceManager));
} else {
if (errors < failOnError) {
bulkResponseData.addUserOperation(getBulkResponseContent(bulkRequestContent, userResourceManager));
}
}
}
for (BulkRequestContent bulkRequestContent : bulkRequestData.getGroupOperationRequests()) {
if (failOnError == 0) {
bulkResponseData.addGroupOperation(getBulkResponseContent(bulkRequestContent, groupResourceManager));
} else {
if (errors < failOnError) {
bulkResponseData.addGroupOperation(getBulkResponseContent(bulkRequestContent, groupResourceManager));
}
}
}
bulkResponseData.setSchema(SCIMConstants.BULK_RESPONSE_URI);
return bulkResponseData;
}
Aggregations