}
Story story = save(support.process(pgProcess), pgSave);
+ pg.setName(story.getMeta().getTitle());
pg.done();
return story.getMeta();
*/
public synchronized Story save(Story story, String luid, Progress pg)
throws IOException {
-
+ if (pg == null) {
+ pg = new Progress();
+ }
+
Instance.getInstance().getTraceHandler().trace(this.getClass().getSimpleName() + ": saving story " + luid);
// Do not change the original metadata, but change the original story
MetaData meta = story.getMeta().clone();
story.setMeta(meta);
+ pg.setName("Saving story");
+
if (luid == null || luid.isEmpty()) {
meta.setLuid(String.format("%03d", getNextId()));
} else {
Instance.getInstance().getTraceHandler()
.trace(this.getClass().getSimpleName() + ": story saved (" + luid + ")");
+ pg.setName(meta.getTitle());
+ pg.done();
return story;
}
} else {
pg.setMinMax(0, 100);
}
+
+ pg.setName("Initialising");
pg.setProgress(1);
Progress pgMeta = new Progress();
Story story = processMeta(true, pgMeta);
pgMeta.done(); // 10%
- pg.setName("Retrieving " + story.getMeta().getTitle());
+ pg.setName(story.getMeta().getTitle());
Progress pgGetChapters = new Progress();
pg.addProgress(pgGetChapters, 10);
pgChaps.done();
}
+ pg.setName(story.getMeta().getTitle());
pg.done();
return story;
} else {
pg.setMinMax(0, 100);
}
+
+ pg.setName("Initialising");
Progress pgMeta = new Progress();
pg.addProgress(pgMeta, 10);
MetaData meta = story.getMeta();
pgMeta.done(); // 10%
+
+ pg.setName(meta.getTitle());
File tmpDir = Instance.getInstance().getTempFiles().createTempDir("info-text");
String basename = null;
}
}
- pg.setProgress(100);
+ pg.setName(meta.getTitle());
+ pg.done();
+
return story;
}