restoreAdditionalData(p);
}
}
private void restoreHeader(Persistor p) {
Persistor header = p.getFirstChild("Header");
if (header == null) {
throw new IllegalArgumentException("Invalid persistor: the Header element is missing");
}
String name = header.getString("Name");
if (name == null) {
throw new IllegalArgumentException("Invalid persistor: the Name field is missing");
}
try {
setName(name);
} catch (IllegalNameException shouldNotHappen) {
shouldNotHappen.printStackTrace();
}
String id = header.getString("ID");
if (id == null) {
throw new IllegalArgumentException("Invalid persistor: the ID field is missing");
}
setID(entityType.getIntegrationId(id));
setDescription(header.getText("Description"));
hasBeenDeployed = header.getBoolean("Deployed");
deployDirty = header.getBoolean("DeployDirty");
hasMoved = header.getBoolean("HasMoved");
setDeleted(header.getBoolean("Deleted"));
}