From 491c7632be1d5ddebc3a2546f9fa6632209f1417 Mon Sep 17 00:00:00 2001 From: Matej Novotny Date: Thu, 29 Sep 2022 16:32:01 +0200 Subject: [PATCH] WELD-2726 Add means to obtain all contextual objects that can be used with Lite extensions --- .../java/org/jboss/weld/manager/api/WeldManager.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java b/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java index f2080842..7c7d8dd5 100644 --- a/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java +++ b/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java @@ -229,4 +229,16 @@ default Collection getActiveWeldAlterableContexts() { .map(t -> (WeldAlterableContext) t) .collect(Collectors.toSet()); } + + /** + * Obtains all {@linkplain Context context objects}, active and inactive, for the given + * {@linkplain jakarta.enterprise.context scope}. + *

+ * This feature is planned to be added into specification as part of + * this issue. + * + * @param scopeType the {@linkplain jakarta.enterprise.context scope}; must not be {@code null} + * @return immutable collection of {@linkplain Context context objects}; never {@code null}, but may be empty + */ + Collection getContexts(Class scopeType); }