close()を廃止, DocumentDetailを取得できるように

This commit is contained in:
r-ca 2024-01-14 16:48:04 +09:00
parent eba02abfd4
commit 7e20d8e443
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
2 changed files with 5 additions and 10 deletions

View File

@ -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: 例外処理
}

View File

@ -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;
}
}