Class ConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
- java.lang.Object
-
- org.glassfish.jersey.microprofile.config.ConfigurationModel<CONFIG>
-
- Type Parameters:
CONFIG- type of MP configuration impl
- All Implemented Interfaces:
Configuration,ExtendedConfig,ExternalConfigurationModel<CONFIG>
public class ConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config> extends Object implements ExternalConfigurationModel<CONFIG>
Generic class which implements default properties provider's logic and wraps not used methods from ExtConfig
-
-
Constructor Summary
Constructors Constructor Description ConfigurationModel(CONFIG config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tas(String name, Class<T> clazz)Set<Class<?>>getClasses()CONFIGgetConfig()Map<Class<?>,Integer>getContracts(Class<?> componentClass)Set<Object>getInstances()<T> Optional<T>getOptionalProperty(String name, Class<T> clazz)Map<String,Object>getProperties()ObjectgetProperty(String name)Collection<String>getPropertyNames()RuntimeTypegetRuntimeType()ObjectgetValueFromConfig(String name)Allows ancestors to work with native configuration providersbooleanisEnabled(Feature feature)booleanisEnabled(Class<? extends Feature> featureClass)booleanisProperty(String name)booleanisRegistered(Class<?> componentClass)booleanisRegistered(Object component)ExternalConfigurationModelmergeProperties(Map<String,Object> inputProperties)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.ws.rs.core.Configuration
hasProperty
-
-
-
-
Constructor Detail
-
ConfigurationModel
public ConfigurationModel(CONFIG config)
-
-
Method Detail
-
as
public <T> T as(String name, Class<T> clazz)
- Specified by:
asin interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
-
getOptionalProperty
public <T> Optional<T> getOptionalProperty(String name, Class<T> clazz)
- Specified by:
getOptionalPropertyin interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
-
getConfig
public CONFIG getConfig()
- Specified by:
getConfigin interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
-
isProperty
public boolean isProperty(String name)
- Specified by:
isPropertyin interfaceExtendedConfig
-
getValueFromConfig
public Object getValueFromConfig(String name)
Allows ancestors to work with native configuration providers- Parameters:
name- property name- Returns:
- property's value if any
-
getRuntimeType
public RuntimeType getRuntimeType()
- Specified by:
getRuntimeTypein interfaceConfiguration
-
getProperties
public Map<String,Object> getProperties()
- Specified by:
getPropertiesin interfaceConfiguration
-
getProperty
public Object getProperty(String name)
- Specified by:
getPropertyin interfaceConfiguration
-
getPropertyNames
public Collection<String> getPropertyNames()
- Specified by:
getPropertyNamesin interfaceConfiguration
-
mergeProperties
public ExternalConfigurationModel mergeProperties(Map<String,Object> inputProperties)
- Specified by:
mergePropertiesin interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
-
isEnabled
public boolean isEnabled(Feature feature)
- Specified by:
isEnabledin interfaceConfiguration
-
isEnabled
public boolean isEnabled(Class<? extends Feature> featureClass)
- Specified by:
isEnabledin interfaceConfiguration
-
isRegistered
public boolean isRegistered(Object component)
- Specified by:
isRegisteredin interfaceConfiguration
-
isRegistered
public boolean isRegistered(Class<?> componentClass)
- Specified by:
isRegisteredin interfaceConfiguration
-
getContracts
public Map<Class<?>,Integer> getContracts(Class<?> componentClass)
- Specified by:
getContractsin interfaceConfiguration
-
getClasses
public Set<Class<?>> getClasses()
- Specified by:
getClassesin interfaceConfiguration
-
getInstances
public Set<Object> getInstances()
- Specified by:
getInstancesin interfaceConfiguration
-
-