From 7951bef6e0188116ed309f06ca77eaefcf4a17af Mon Sep 17 00:00:00 2001 From: r-ca Date: Tue, 9 Jan 2024 14:02:07 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=87=A6=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processor/impl/DocumentProcessorImpl.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java index 4631b33c..2b1959dd 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java +++ b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java @@ -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