for (SourcePojo source: sources)
{
ResponsePojo rp1 = null;
SourceHandler tmpHandler = new SourceHandler();
if (1 == source.getCommunityIds().size()) { // delete this source
rp1 = tmpHandler.deleteSource(source.getId().toString(), communityIdStr, personIdStr, false);
// (deletes all docs and removes from the share)
}
else { // Still need to delete docs from this share from this community
rp1 = tmpHandler.deleteSource(source.getId().toString(), communityIdStr, personIdStr, true);
}