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 -
Method Summary
Modifier and TypeMethodDescription<T> TGet 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 providersbooleanbooleanbooleanisProperty(String name) Get the value of the property with a given name converted toboolean.booleanisRegistered(Class<?> componentClass) booleanisRegistered(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, waitMethods inherited from interface jakarta.ws.rs.core.Configuration
hasProperty
-
Constructor Details
-
ConfigurationModel
-
-
Method Details
-
as
Description copied from interface:ExternalConfigurationModelGet 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:
asin 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:ExternalConfigurationModelGet 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:
getOptionalPropertyin 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:ExternalConfigurationModelObtain config object- Specified by:
getConfigin interfaceExternalConfigurationModel<CONFIG extends org.eclipse.microprofile.config.Config>- Returns:
- external config provider
-
isProperty
Description copied from interface:ExtendedConfigGet the value of the property with a given name converted toboolean. Returnsfalseif the value is not convertible.- Specified by:
isPropertyin interfaceExtendedConfig- Parameters:
name- property name.- Returns:
booleanproperty value orfalseif 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:
getRuntimeTypein interfaceConfiguration
-
getProperties
- Specified by:
getPropertiesin interfaceConfiguration
-
getProperty
- Specified by:
getPropertyin interfaceConfiguration
-
getPropertyNames
- Specified by:
getPropertyNamesin interfaceConfiguration
-
mergeProperties
Description copied from interface:ExternalConfigurationModelMerge properties from other (found) external configuration.- Specified by:
mergePropertiesin 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:
isEnabledin interfaceConfiguration
-
isEnabled
- Specified by:
isEnabledin interfaceConfiguration
-
isRegistered
- Specified by:
isRegisteredin interfaceConfiguration
-
isRegistered
- Specified by:
isRegisteredin interfaceConfiguration
-
getContracts
- Specified by:
getContractsin interfaceConfiguration
-
getClasses
- Specified by:
getClassesin interfaceConfiguration
-
getInstances
- Specified by:
getInstancesin interfaceConfiguration
-