保存処理

This commit is contained in:
r-ca 2024-01-09 14:02:07 +09:00
parent fbde892f40
commit 7951bef6e0
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -95,7 +95,17 @@ public class DocumentProcessorImpl implements DocumentProcessor{
logger.debug("addNewPageToLast", "called");
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
this.fileManager.resolve(DEFAULT_SAVE_DIR).createDirectory();
FileManager rawFileManager = fileManager.resolve(DEFAULT_SAVE_DIR).createDirectoryIfNotExist().getCurrentInstance();
rawFileManager.saveBitmap(bitmap, filename);
XmlMetaPageModel xmlMetaPageModel = new XmlMetaPageModel();
xmlMetaPageModel.setFilename(filename);
xmlMetaPageModel.setIndex(xmlMetaModel.getPages().size() + 1);
xmlMetaModel.getPages().add(xmlMetaPageModel);
logger.info("addNewPageToLast", "finished");
logger.info("addNewPageToLast", "filename: " + filename + ", index: " + xmlMetaPageModel.getIndex());
}
@Override