// for each object, check whether the object is valid for the current
// operation
if (entityDescribes != null) {
for (Entry<String, DescribeGlobalSObjectResult> entry : entityDescribes.entrySet()) {
String objectName = entry.getKey();
DescribeGlobalSObjectResult objectDesc = entry.getValue();
if (operation.isDelete() && objectDesc.isDeletable()) {
inputDescribes.put(objectName, objectDesc);
} else if (operation == OperationInfo.insert && objectDesc.isCreateable()) {
inputDescribes.put(objectName, objectDesc);
} else if (operation == OperationInfo.update && objectDesc.isUpdateable()) {
inputDescribes.put(objectName, objectDesc);
} else if (operation == OperationInfo.upsert && (objectDesc.isUpdateable() || objectDesc.isCreateable())) {
inputDescribes.put(objectName, objectDesc);
}
}
}
lv.setInput(inputDescribes);