From d2ebed3934b2b830b6514d26f14e53537721cb8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 12 Jan 2024 11:02:50 +0900 Subject: [PATCH] =?UTF-8?q?DocumentDetail=E3=82=92=E7=94=9F=E6=88=90?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=86=85=E9=83=A8=E3=83=A1=E3=82=BD=E3=83=83?= =?UTF-8?q?=E3=83=89=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/impl/LacertaLibraryStubImpl.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryStubImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryStubImpl.java index e8eff706..b4f143a3 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryStubImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryStubImpl.java @@ -6,6 +6,8 @@ import one.nem.lacerta.model.ListItem; import one.nem.lacerta.model.ListItemType; import one.nem.lacerta.model.document.DocumentDetail; +import one.nem.lacerta.model.document.DocumentMeta; +import one.nem.lacerta.model.document.path.DocumentPath; import one.nem.lacerta.utils.LacertaLogger; import com.github.javafaker.Faker; @@ -113,6 +115,21 @@ public class LacertaLibraryStubImpl implements LacertaLibrary { return libraryItemPage; } + private DocumentDetail generateStubDocumentDetail() { + DocumentMeta documentMeta = new DocumentMeta(); + documentMeta.setId(UUID.randomUUID().toString()); + documentMeta.setTitle("FakeDocument" + faker.book().title()); + documentMeta.setCreatedAt(faker.date().birthday()); + documentMeta.setUpdatedAt(faker.date().birthday()); // TODO-rca: 更新日のほうが古くなることがあるのでなんとかする? + ArrayList tagIds = new ArrayList<>(); + + DocumentDetail documentDetail = new DocumentDetail(); + documentDetail.setMeta(documentMeta); + documentDetail.setPath(null); // TODO-rca: なんとかする + documentDetail.setAuthor(faker.name().fullName()); + documentDetail.setRepository(null); // TODO-rca: なんとかする + return documentDetail; + } @Override public LibraryItemPage getRecentDocument(int limit) { return getRecentDocumentPage(limit);