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:
jakarta.ws.rs.core.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()jakarta.ws.rs.RuntimeTypegetRuntimeType()ObjectgetValueFromConfig(String name)Allows ancestors to work with native configuration providersbooleanisEnabled(jakarta.ws.rs.core.Feature feature)booleanisEnabled(Class<? extends jakarta.ws.rs.core.Feature> featureClass)booleanisProperty(String name)booleanisRegistered(Class<?> componentClass)booleanisRegistered(Object component)ExternalConfigurationModelmergeProperties(Map<String,Object> inputProperties)
-
-
-
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 jakarta.ws.rs.RuntimeType getRuntimeType()
- Specified by:
getRuntimeTypein interfacejakarta.ws.rs.core.Configuration
-
getProperties
public Map<String,Object> getProperties()
- Specified by:
getPropertiesin interfacejakarta.ws.rs.core.Configuration
-
getProperty
public Object getProperty(String name)
- Specified by:
getPropertyin interfacejakarta.ws.rs.core.Configuration
-
getPropertyNames
public Collection<String> getPropertyNames()
- Specified by:
getPropertyNamesin interfacejakarta.ws.rs.core.Configuration
-
mergeProperties
public ExternalConfigurationModel mergeProperties(Map<String,Object> inputProperties)
- Specified by:
mergePropertiesin interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
-
isEnabled
public boolean isEnabled(jakarta.ws.rs.core.Feature feature)
- Specified by:
isEnabledin interfacejakarta.ws.rs.core.Configuration
-
isEnabled
public boolean isEnabled(Class<? extends jakarta.ws.rs.core.Feature> featureClass)
- Specified by:
isEnabledin interfacejakarta.ws.rs.core.Configuration
-
isRegistered
public boolean isRegistered(Object component)
- Specified by:
isRegisteredin interfacejakarta.ws.rs.core.Configuration
-
isRegistered
public boolean isRegistered(Class<?> componentClass)
- Specified by:
isRegisteredin interfacejakarta.ws.rs.core.Configuration
-
getContracts
public Map<Class<?>,Integer> getContracts(Class<?> componentClass)
- Specified by:
getContractsin interfacejakarta.ws.rs.core.Configuration
-
getClasses
public Set<Class<?>> getClasses()
- Specified by:
getClassesin interfacejakarta.ws.rs.core.Configuration
-
-