private boolean performImport() throws Exception {
RequestLifeCycle.begin(PortalContainer.getInstance());
try {
POMSession session = pomMgr.getSession();
// Obtain the status
Workspace workspace = session.getWorkspace();
boolean perform = !workspace.isAdapted(Imported.class);
// We mark it
if (perform) {
Imported imported = workspace.adapt(Imported.class);
imported.setCreationDate(new Date());
// for legacy checking
if (dataStorage_.getPortalConfig(defaultPortal) != null) {
perform = false;
imported.setStatus(Status.DONE.status());
} else {
isFirstStartup = true;
}
session.save();
} else {
Imported imported = workspace.adapt(Imported.class);
Integer st = imported.getStatus();
if (st != null) {
Status status = Status.getStatus(st);