throw new IOException("Output type not supported: " + type);
}
+ Story story = getStory(luid);
+ if (story == null) {
+ throw new IOException("Cannot find story to export: " + luid);
+ }
+
return out.process(getStory(luid), target);
}
* in case of I/O error
*/
private Story save(Story story, String luid) throws IOException {
+ // Do not change the original metadata, but change the original story
MetaData key = story.getMeta().clone();
+ story.setMeta(key);
if (luid == null || luid.isEmpty()) {
getStories(); // refresh lastId if needed