From 002c78d09ba11f9c7623576dd080f74e5d6fb2eb Mon Sep 17 00:00:00 2001 From: r-ca Date: Sat, 13 Jan 2024 15:17:48 +0900 Subject: [PATCH] =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/model/PublicPath.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/model/src/main/java/one/nem/lacerta/model/PublicPath.java b/model/src/main/java/one/nem/lacerta/model/PublicPath.java index 0da4ce3f..980a3a9d 100644 --- a/model/src/main/java/one/nem/lacerta/model/PublicPath.java +++ b/model/src/main/java/one/nem/lacerta/model/PublicPath.java @@ -6,6 +6,11 @@ import java.util.List; public class PublicPath { /* * ユーザーが扱うパス(内部パスの代替) + * (時間がないのでInjectされることは考慮しない) + * + * TODO-rca: + * - こわれたパスを検知する + * - バリデーション */ List path = new ArrayList(); @@ -41,6 +46,18 @@ public class PublicPath { return this; } + public PublicPath resolve(PublicPath path) { + for (String p : path.getPath()) { + resolveInternal(p); + } + return this; + } + + public PublicPath parent() { + this.path.remove(this.path.size() - 1); + return this; + } + public List getPath() { return path; }