Class ContextFacade
java.lang.Object
org.openehealth.ipf.commons.core.config.ContextFacade
Facade to an active registry, providing static access to their registered
beans.
The ContextFacade is supposed to be used by Groovy Extension Modules that
require a global piece of configuration or context. As Extension Modules
are stateless, they have to obtain this information at runtime by means of
statically access, i.e. calling the getBean methods of this class. Before
this can be done, the registry must be set by calling
setRegistry(Registry)
.- Since:
- 2.5
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Empties the registrystatic <B> B
static <B> B
static <B> Collection<B>
static void
setRegistry
(Registry registry)
-
Constructor Details
-
ContextFacade
public ContextFacade()
-
-
Method Details
-
setRegistry
-
getBean
- Parameters:
requiredType
- required bean type- Returns:
- bean of the required type
- Since:
- 2.5
-
getBeans
- Parameters:
requiredType
- required bean type- Returns:
- bean of the required type
- Since:
- 3.5
-
getBean
- Parameters:
beanName
- name- Returns:
- bean of the required type
- Since:
- 2.5
-
clearRegistry
public static void clearRegistry()Empties the registry
-