cleanupOldFiles();
}
private void loadEntities(ProjectStructurePersistor.Node node, IntegrationEntity parent)
throws InterchangeLoadingException {
EntityDescriptor desc = node.getEntity();
if (desc != null) { // Will be null for the root node
String name = node.getName();
File file = FileSupport.getFile(dataDirectory, desc);
files.add(file);
if (file.exists()) {
IntegrationEntity entity = createEntityShell(type, desc);
loadItemData(parent, file, entity);
parent = entity;
} else {
String err = "Could not restore the " + desc.getEntityType() + " \"" + name + "\" [GUID = "
+ desc.getID() + "] that is referred to in the project file, "
+ "because the corresponding data file " + file.getAbsolutePath() + " does not exist.";
ErrorLog.log(ProjectLoaderImpl.class, err, new Exception(err));
}
}
for (ProjectStructurePersistor.Node child : node.children()) {