GroupMembership groupMembership = _app.getMembershipMgr().get(key);
if (groupMembership == null)
{
results.put(key, new UpdateResponse(HttpStatus.S_404_NOT_FOUND));
}
else
{
try
{
PatchApplier.applyPatch(groupMembership, patch);
_app.getMembershipMgr().save(groupMembership);
results.put(key, new UpdateResponse(HttpStatus.S_204_NO_CONTENT));
}
catch (DataProcessingException e)
{
results.put(key, new UpdateResponse(HttpStatus.S_400_BAD_REQUEST));
}
}
}
return new BatchUpdateResult<CompoundKey, GroupMembership>(results);
}