track by-product files rendering resources
This commit is contained in:
parent
4581849e72
commit
7d7988597c
|
@ -768,6 +768,7 @@ public class PatientRenderer extends ResourceRenderer {
|
||||||
} else {
|
} else {
|
||||||
String n = UUID.randomUUID().toString().toLowerCase()+ext;
|
String n = UUID.randomUUID().toString().toLowerCase()+ext;
|
||||||
TextFile.bytesToFile(att.getData(), new File(Utilities.path(context.getDestDir(), n)));
|
TextFile.bytesToFile(att.getData(), new File(Utilities.path(context.getDestDir(), n)));
|
||||||
|
context.registerFile(n);
|
||||||
td.img(n, "patient photo");
|
td.img(n, "patient photo");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -188,6 +188,7 @@ public class RenderingContext {
|
||||||
private boolean copyButton;
|
private boolean copyButton;
|
||||||
private ProfileKnowledgeProvider pkp;
|
private ProfileKnowledgeProvider pkp;
|
||||||
private String changeVersion;
|
private String changeVersion;
|
||||||
|
private List<String> files = new ArrayList<String>(); // files created as by-products in destDir
|
||||||
|
|
||||||
private Map<KnownLinkType, String> links = new HashMap<>();
|
private Map<KnownLinkType, String> links = new HashMap<>();
|
||||||
private Map<String, String> namedLinks = new HashMap<>();
|
private Map<String, String> namedLinks = new HashMap<>();
|
||||||
|
@ -726,4 +727,16 @@ public class RenderingContext {
|
||||||
return namedLinks;
|
return namedLinks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void registerFile(String n) {
|
||||||
|
try {
|
||||||
|
files.add(Utilities.path(destDir, n));
|
||||||
|
} catch (IOException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getFiles() {
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue