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
-
Method Summary
Modifier and TypeMethodDescription<T> T
Get value of a property as a definite type property shall exist in order for this method to be used.Obtain config objectgetContracts
(Class<?> componentClass) <T> Optional<T>
getOptionalProperty
(String name, Class<T> clazz) Get value of a property as a definite type property may not exist, an empty Optional object is returned in case of an empty propertygetProperty
(String name) getValueFromConfig
(String name) Allows ancestors to work with native configuration providersboolean
boolean
boolean
isProperty
(String name) Get the value of the property with a given name converted toboolean
.boolean
isRegistered
(Class<?> componentClass) boolean
isRegistered
(Object component) mergeProperties
(Map<String, Object> inputProperties) Merge properties from other (found) external configuration.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 Details
-
ConfigurationModel
-
-
Method Details
-
as
Description copied from interface:ExternalConfigurationModel
Get value of a property as a definite type property shall exist in order for this method to be used. Otherwise exception is thrown- Specified by:
as
in interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
- Type Parameters:
T
- type of an expected value- Parameters:
name
- property nameclazz
- class type of an expected value- Returns:
- value of an expected type
-
getOptionalProperty
Description copied from interface:ExternalConfigurationModel
Get value of a property as a definite type property may not exist, an empty Optional object is returned in case of an empty property- Specified by:
getOptionalProperty
in interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
- Type Parameters:
T
- type of an expected value- Parameters:
name
- property nameclazz
- class type of an expected value- Returns:
- Optional object filled by a value of an expected type or by the NULL value (
-
getConfig
Description copied from interface:ExternalConfigurationModel
Obtain config object- Specified by:
getConfig
in interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
- Returns:
- external config provider
-
isProperty
Description copied from interface:ExtendedConfig
Get the value of the property with a given name converted toboolean
. Returnsfalse
if the value is not convertible.- Specified by:
isProperty
in interfaceExtendedConfig
- Parameters:
name
- property name.- Returns:
boolean
property value orfalse
if the property is not convertible.
-
getValueFromConfig
Allows ancestors to work with native configuration providers- Parameters:
name
- property name- Returns:
- property's value if any
-
getRuntimeType
- Specified by:
getRuntimeType
in interfaceConfiguration
-
getProperties
- Specified by:
getProperties
in interfaceConfiguration
-
getProperty
- Specified by:
getProperty
in interfaceConfiguration
-
getPropertyNames
- Specified by:
getPropertyNames
in interfaceConfiguration
-
mergeProperties
Description copied from interface:ExternalConfigurationModel
Merge properties from other (found) external configuration.- Specified by:
mergeProperties
in interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>
- Parameters:
inputProperties
- those properties will be merged into ours- Returns:
- current instance of the model
-
isEnabled
- Specified by:
isEnabled
in interfaceConfiguration
-
isEnabled
- Specified by:
isEnabled
in interfaceConfiguration
-
isRegistered
- Specified by:
isRegistered
in interfaceConfiguration
-
isRegistered
- Specified by:
isRegistered
in interfaceConfiguration
-
getContracts
- Specified by:
getContracts
in interfaceConfiguration
-
getClasses
- Specified by:
getClasses
in interfaceConfiguration
-
getInstances
- Specified by:
getInstances
in interfaceConfiguration
-