From 07b64346891abd6649b6d3ea8ff0f74183576ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 11 Dec 2023 14:36:08 +0900 Subject: [PATCH] Impl --- .../lacerta/data/impl/stub/DocumentsImpl.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/stub/DocumentsImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/stub/DocumentsImpl.java index 0926e8eb..ec616dc4 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/stub/DocumentsImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/stub/DocumentsImpl.java @@ -37,4 +37,20 @@ public class DocumentsImpl implements Documents { return documentMetaList; } + public ArrayList getStarredDocuments(int limit) { // Generate dummy data + ArrayList documentMetaList = new ArrayList<>(); + for (int i = 0; i < limit; i++) { + DocumentMeta documentMeta = new DocumentMeta(); + documentMeta.id = UUID.randomUUID().toString(); + documentMeta.name = "Document " + i; + documentMeta.created = new Date(); + documentMeta.type = new Random(i).nextInt()/2 == 0 ? DocumentType.OTHER : DocumentType.NOTEBOOK; + documentMeta.tags = new String[] {"tag1", "tag2", "tag3"}; + documentMeta.categories = new String[] {"category1", "category2", "category3"}; + documentMetaList.add(documentMeta); + } + + return documentMetaList; + } + }