Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Add LionWebClient.clearContainment
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomassetti committed Jun 27, 2024
1 parent 0191ccc commit 6c528fd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
egl = "0.9.8"
kolasu = "1.5.59"
rpg = "2.1.52"
egl = "0.9.9"
kolasu = "1.5.61-SNAPSHOT"
rpg = "2.1.55"
javamodule = "0.9.19"

[plugins]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,18 @@ class LionWebClient(
return lwNode.getChildren(containment).map { it.id!! }
}

fun clearContainment(
containerId: String,
containmentName: String,
) {
val lwNode = retrieve(containerId, retrievalMode = RetrievalMode.SINGLE_NODE)
val containment = lwNode.classifier.getContainmentByName(containmentName) ?: throw java.lang.IllegalStateException()
lwNode.getChildren(containment).forEach {
lwNode.removeChild(it)
}
storeTree(lwNode)
}

// Private methods

private var httpClient: OkHttpClient =
Expand Down

0 comments on commit 6c528fd

Please sign in to comment.