public synchronized MetaResultList getList(Progress pg) throws IOException {
return new MetaResultList(getMetas(pg));
}
-
- //TODO: make something for (normal and custom) not-story covers
-
+
+ // TODO: make something for (normal and custom) not-story covers
+
/**
* Return the cover image associated to this source.
* <p>
// We will let it fail later
}
}
-
+
/**
* Check if the {@link Story} denoted by this Library UID is present in the
* cache (if we have no cache, we default to </t>true</tt>).
// By default, everything is cached
return true;
}
-
+
/**
* Clear the {@link Story} from the cache, if needed.
* <p>
} catch (IOException e) {
// We should not have not-supported files in the
// library
- Instance.getInstance().getTraceHandler().error(new IOException(
- String.format("Cannot load file of type '%s' from library: %s", meta.getType(), file), e));
+ Instance.getInstance().getTraceHandler()
+ .error(new IOException(String.format(
+ "Cannot load file of type '%s' from library: %s",
+ meta.getType(), file), e));
} finally {
pgProcess.done();
pg.done();
if (pg == null) {
pg = new Progress();
}
-
- Instance.getInstance().getTraceHandler().trace(this.getClass().getSimpleName() + ": saving story " + luid);
+
+ 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 {
updateInfo(story.getMeta());
Instance.getInstance().getTraceHandler()
- .trace(this.getClass().getSimpleName() + ": story saved (" + luid + ")");
+ .trace(this.getClass().getSimpleName() + ": story saved ("
+ + luid + ")");
pg.setName(meta.getTitle());
pg.done();
* in case of I/O error
*/
public synchronized void delete(String luid) throws IOException {
- Instance.getInstance().getTraceHandler().trace(this.getClass().getSimpleName() + ": deleting story " + luid);
+ Instance.getInstance().getTraceHandler().trace(
+ this.getClass().getSimpleName() + ": deleting story " + luid);
doDelete(luid);
invalidateInfo(luid);
Instance.getInstance().getTraceHandler()
- .trace(this.getClass().getSimpleName() + ": story deleted (" + luid
- + ")");
+ .trace(this.getClass().getSimpleName() + ": story deleted ("
+ + luid + ")");
}
/**