public void insertEntity(IntegrationEntity entity, IntegrationEntity parent) {
// TODO: We should perhaps handle the case where entity already
// belongs to another parent. That should never happen, but since this
// is a public method and all...
if (parent == null) {
EntityType type = EntityUtils.getItemType(entity);
parent = getRootFolder(type);
}
if (ProjectUtils.getProject(parent) != this) {
return;
}