@Override
public synchronized Story getStory(String luid, MetaData meta, Progress pg) {
- String normal = Instance.getUiConfig().getString(
- UiConfig.GUI_NON_IMAGES_DOCUMENT_TYPE);
- String images = Instance.getUiConfig().getString(
- UiConfig.GUI_IMAGES_DOCUMENT_TYPE);
- String type = meta.isImageDocument() ? images : normal;
-
+ String type = cacheLib.getOutputType(meta.isImageDocument());
MetaData cachedMeta = meta.clone();
cachedMeta.setType(type);
if (meta != null && meta.isImageDocument()) {
return image;
}
-
+
return text;
}
+
+ /**
+ * Return the default {@link OutputType} for this kind of {@link Story}.
+ *
+ * @param imageDocument
+ * TRUE for images document, FALSE for text documents
+ *
+ * @return the type
+ */
+ public String getOutputType(boolean imageDocument) {
+ if (imageDocument) {
+ return image.toString();
+ }
+
+ return text.toString();
+ }
/**
* Get the target {@link File} related to the given <tt>.info</tt>