From 7e20d8e443a6755e881df09fb00925858666487a Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 14 Jan 2024 16:48:04 +0900 Subject: [PATCH] =?UTF-8?q?close()=E3=82=92=E5=BB=83=E6=AD=A2,=20DocumentD?= =?UTF-8?q?etail=E3=82=92=E5=8F=96=E5=BE=97=E3=81=A7=E3=81=8D=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/processor/DocumentProcessor.java | 4 +++- .../lacerta/processor/impl/DocumentProcessorImpl.java | 11 ++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java index d5584c24..1f8e77c6 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java +++ b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java @@ -2,6 +2,8 @@ package one.nem.lacerta.processor; import android.graphics.Bitmap; +import one.nem.lacerta.model.document.DocumentDetail; + public interface DocumentProcessor { // ページ操作 @@ -18,7 +20,7 @@ public interface DocumentProcessor { Bitmap getPageAtIndex(int index); int getPageCount(); - void close() throws Exception; + DocumentDetail getDocumentDetail(); void init() throws Exception; // TODO-rca: 例外処理 } 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 004a82fe..3badf9cc 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 @@ -141,14 +141,7 @@ public class DocumentProcessorImpl implements DocumentProcessor{ } @Override - public void close() throws Exception{ - logger.debug("close", "called"); - try { - this.fileManager.getNewInstance().createFileIfNotExist("meta.xml").saveXml(xmlMetaParser.serialize(xmlMetaModel), "meta.xml"); - logger.debug("close", "meta.xml saved"); - } catch (Exception e) { - logger.error("close", "meta.xml save failed"); - logger.trace("close", e.getMessage()); - } + public DocumentDetail getDocumentDetail() { + return this.documentDetail; } }