Class SmallRyeConfig
- All Implemented Interfaces:
Serializable,org.eclipse.microprofile.config.Config
SmallRyeConfig provides a way to retrieve configuration values from a configuration name.
A SmallRyeConfig instance is obtained via the SmallRyeConfigBuilder.build(), which details how
SmallRyeConfig will behave. Generally, a SmallRyeConfig instance is composed of:
- Configuration Sources to lookup the configuration values
- Converters to convert values to specific types
- Interceptors to enhance the configuration lookup process
- ConfigMapping Config Mappings classes to group multiple configuration values in a common prefix
- Author:
- Jeff Mesnil, David M. Lloyd, Roberto Cortez
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfiguration name to set additional config locations to be loaded with the Config.static final StringConfiguration name to enable logging of configuration values lookup inDEBUGlog level.static final StringConfiguration name to validate that aConfigMappingmaps every available configuration name contained in the mapping prefix.static final StringConfiguration name to set the main Profiles to activate.static final StringConfiguration name to set the parent Profile to activate.static final StringConfiguration name to set the names of the secret handlers to be loaded.Fields inherited from interface org.eclipse.microprofile.config.Config
PROFILE, PROPERTY_EXPRESSIONS_ENABLED -
Method Summary
Modifier and TypeMethodDescription<T> TDeprecated.<T> TconvertValue(ConfigValue configValue, org.eclipse.microprofile.config.spi.Converter<T> converter) <T> TgetConfigMapping(Class<T> type) Returns an instance of aConfigMappingannotated type, mapping all the configuration names matching theConfigMapping.prefix()and theConfigMappingmembers to values from the underlying configuration sources.<T> TgetConfigMapping(Class<T> type, String prefix) Returns an instance of aConfigMappingannotated type, mapping all the configuration names matching the prefix and theConfigMappingmembers to values from the underlying configuration sources.Optional<org.eclipse.microprofile.config.spi.ConfigSource> getConfigSource(String name) Return the first registered configuration sources inSmallRyeConfigthat match the specified name, sorted by descending ordinal value and name.Iterable<org.eclipse.microprofile.config.spi.ConfigSource> Iterable<org.eclipse.microprofile.config.spi.ConfigSource> getConfigSources(Class<?> type) Return the currently registered configuration sources inSmallRyeConfigthat match the specified typegetConfigValue(String name) Returns theConfigValuefor the specified configuration name from the underlying configuration sources.<T> Optional<org.eclipse.microprofile.config.spi.Converter<T>> getConverter(Class<T> asType) <T> org.eclipse.microprofile.config.spi.Converter<T> getConverter$$bridge(Class<T> asType) Deprecated.<T,C extends Collection<T>>
Optional<C> getIndexedOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory) Deprecated, for removal: This API element is subject to removal in a future version.getIndexedProperties(String property) getIndexedPropertiesIndexes(String property) <T,C extends Collection<T>>
CgetIndexedValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory) Deprecated, for removal: This API element is subject to removal in a future version.Provides a way to retrieve an updated list of all property names.getMapIndexedKeys(String name) getMapKeys(String name) <T> Optional<T> getOptionalValue(String name, Class<T> propertyType) Returns the value for the specified configuration name from the underlying configuration sources.<T> Optional<T> getOptionalValue(String name, org.eclipse.microprofile.config.spi.Converter<T> converter) Returns the value for the specified configuration name from the underlying configuration sources.getOptionalValues(String name, Class<K> keyClass, Class<V> valueClass) Returns the values for the specified configuration name from the underlying configuration sources.<K,V, C extends Collection<V>>
Optional<Map<K, C>> getOptionalValues(String name, Class<K> keyClass, Class<V> valueClass, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.getOptionalValues(String name, Class<T> propertyType) Returns the values for the specified configuration name from the underlying configuration sources.<T,C extends Collection<T>>
Optional<C> getOptionalValues(String name, Class<T> itemClass, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.getOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter) Returns the values for the specified configuration name from the underlying configuration sources.<K,V, C extends Collection<V>>
Optional<Map<K, C>> getOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter, IntFunction<Map<K, C>> mapFactory, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.getOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter, IntFunction<Map<K, V>> mapFactory) Returns the values for the specified configuration name from the underlying configuration sources.<T,C extends Collection<T>>
Optional<C> getOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.Returns aListof the active profiles inSmallRyeConfig.This implementation caches the list of property names collected whenSmallRyeConfigis built viaSmallRyeConfigBuilder.build().getRawValue(String name) Deprecated.<T> TReturns the value for the specified configuration name from the underlying configuration sources.<T> TReturns the value for the specified configuration name from the underlying configuration sources.<K,V> Map <K, V> Returns the values for the specified configuration name from the underlying configuration sources.<K,V, C extends Collection<V>>
Map<K, C> getValues(String name, Class<K> keyClass, Class<V> valueClass, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.<T> List<T> Returns the values for the specified configuration name from the underlying configuration sources.<T,C extends Collection<T>>
CgetValues(String name, Class<T> itemClass, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.<K,V> Map <K, V> getValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter) Returns the values for the specified configuration name from the underlying configuration sources.<K,V, C extends Collection<V>>
Map<K, C> getValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter, IntFunction<Map<K, C>> mapFactory, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.<K,V> Map <K, V> getValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter, IntFunction<Map<K, V>> mapFactory) Returns the values for the specified configuration name from the underlying configuration sources.<T,C extends Collection<T>>
CgetValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.booleanisPropertyPresent(String name) Checks if a property is present in theConfiginstance.<T> org.eclipse.microprofile.config.spi.Converter<T> requireConverter(Class<T> asType) Return theConverterused by this instance to produce instances of the specified type fromStringvalues.<T> T
-
Field Details
-
SMALLRYE_CONFIG_PROFILE
Configuration name to set the main Profiles to activate. The configuration supports multiple profiles separated by a comma.- See Also:
-
SMALLRYE_CONFIG_PROFILE_PARENT
Configuration name to set the parent Profile to activate.- See Also:
-
SMALLRYE_CONFIG_LOCATIONS
Configuration name to set additional config locations to be loaded with the Config. The configuration supports multiple locations separated by a comma and each must represent a validjava.net.URI.- See Also:
-
SMALLRYE_CONFIG_MAPPING_VALIDATE_UNKNOWN
Configuration name to validate that aConfigMappingmaps every available configuration name contained in the mapping prefix. The configuration value must be aboolean.- See Also:
-
SMALLRYE_CONFIG_SECRET_HANDLERS
Configuration name to set the names of the secret handlers to be loaded. A value ofallloads all available secret handlers and a value of noneskipsthe load. The configuration supports multiple secret handlers separated by a comma.- See Also:
-
SMALLRYE_CONFIG_LOG_VALUES
Configuration name to enable logging of configuration values lookup inDEBUGlog level. The configuration value must be aboolean.- See Also:
-
-
Method Details
-
getValues
Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returningListconverted to their specified property type. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in a
Listwith the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in aListwith the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Specified by:
getValuesin interfaceorg.eclipse.microprofile.config.Config- Type Parameters:
T- the item type- Parameters:
name- The configuration property name to look for in the configurationpropertyType- The type into which the resolved property values are converted- Returns:
- the resolved property values as a
Listof instances of the property type - Throws:
IllegalArgumentException- if the property values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getValues
public <T,C extends Collection<T>> C getValues(String name, Class<T> itemClass, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returningCollectionconverted to their specified property type. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in a
Collectionwith the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in aCollectionwith the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
T- the item typeC- the collection type- Parameters:
name- The configuration property name to look for in the configurationitemClass- The type into which the resolved property values are convertedcollectionFactory- the resulting instance of aCollectionto return the property values- Returns:
- the resolved property values as a
Collectionof instances of the property type - Throws:
IllegalArgumentException- if the property values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getValues
public <T,C extends Collection<T>> C getValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returningCollectionconverted by the specifiedConverter. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in a
Collectionwith the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in aCollectionwith the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand theConverterto convert the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
T- the item typeC- the collection type- Parameters:
name- The configuration property name to look for in the configurationconverter- TheConverterto use to convert the resolved property valuescollectionFactory- the resulting instance of aCollectionto return the property values- Returns:
- the resolved property values as a
Collectionof instances of the property type - Throws:
IllegalArgumentException- if the property values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getIndexedValues
@Deprecated(forRemoval=true) public <T,C extends Collection<T>> C getIndexedValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory) Deprecated, for removal: This API element is subject to removal in a future version. -
getIndexedProperties
-
getIndexedPropertiesIndexes
-
getValues
Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed properties. A keyed property uses the original property name plus an additional dotted segment to represent aMapkey, asmy.property.key, wheremy.propertyis the property name andkeyis theMapkey. All keyed properties are queried for their values, which represent a single entry in the returningMapconverting both the key and value to their specified types. The following configuration:- server.reasons.200=OK
- server.reasons.201=CREATED
- server.reasons.404=NOT_FOUND
Results in a
Mapwith the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasons, the key type asIntegerand the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;with the backslash (\) as the escape character. A configuration ofserver.reasons=200=OK;201=CREATED;404=NOT_FOUNDresults in aMapwith the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasons, the key type asIntegerand the property type as aString.The keyed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value type- Parameters:
name- The configuration property name to look for in the configurationkeyClass- The type into which the resolved property keys are convertedvalueClass- The type into which the resolved property values are converted- Returns:
- the resolved property values as a
Mapof keys of the property name and values of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getValues
public <K,V> Map<K,V> getValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed properties. A keyed property uses the original property name plus an additional dotted segment to represent aMapkey, asmy.property.key, wheremy.propertyis the property name andkeyis theMapkey. All keyed properties are queried for their values, which represent a single entry in the returningMapconverting both the key and value using the specified Converters. The following configuration:- server.reasons.200=OK
- server.reasons.201=CREATED
- server.reasons.404=NOT_FOUND
Results in a
Mapwith the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasonsand Converters to convert the key type as anIntegerand the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;with the backslash (\) as the escape character. A configuration ofserver.reasons=200=OK;201=CREATED;404=NOT_FOUNDresults in aMapwith the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasonsand Converters to convert the key type as anIntegerand the property type as aString.The keyed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value type- Parameters:
name- The configuration property name to look for in the configurationkeyConverter- TheConverterto use to convert the resolved property keysvalueConverter- TheConverterto use to convert the resolved property values- Returns:
- the resolved property values as a
Mapof keys of the property name and values of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getValues
public <K,V> Map<K,V> getValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter, IntFunction<Map<K, V>> mapFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed properties. A keyed property uses the original property name plus an additional dotted segment to represent aMapkey, asmy.property.key, wheremy.propertyis the property name andkeyis theMapkey. All keyed properties are queried for their values, which represent a single entry in the returningMapconverting both the key and value using the specified Converters. The following configuration:- server.reasons.200=OK
- server.reasons.201=CREATED
- server.reasons.404=NOT_FOUND
Results in a
Mapwith the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasonsand Converters to convert the key type as anIntegerand the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;with the backslash (\) as the escape character. A configuration ofserver.reasons=200=OK;201=CREATED;404=NOT_FOUNDresults in aMapwith the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasonsand Converters to convert the key type as anIntegerand the property type as aString.The keyed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value type- Parameters:
name- The configuration property name to look for in the configurationkeyConverter- TheConverterto use to convert the resolved property keysvalueConverter- TheConverterto use to convert the resolved property valuesmapFactory- the resulting instance of aMapto return the property keys and values- Returns:
- the resolved property values as a
Mapof keys of the property name and values of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getValues
public <K,V, Map<K,C extends Collection<V>> C> getValues(String name, Class<K> keyClass, Class<V> valueClass, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed indexed properties. A keyed indexed property uses the original property name plus an additional dotted segment to represent aMapkey followed by square brackets and an index in between, asmy.property.key[0], wheremy.propertyis the property name,keyis theMapkey and {code [0]} the index of theCollectionelement. All keyed indexed properties are queried for their value, which represent a single entry in the returningMap, and single element in theCollectionvalue, converting both the key and value to their specified types. The following configuration:- server.env.prod[0]=alpha
- server.env.prod[1]=beta
- server.env.dev[0]=local
Results in a
Mapwith the entry keyprodand entry valueCollectionwith the valuesalphaandbeta, and the entry keydevand entry valueCollectionwith the valuelocal, considering the configuration name asserver.env, the key type as aString, and the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;and value as a comma-separated string (,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofserver.env=prod=alpha,beta;dev=localresults in aMapwith the entry keyprodand entry valueCollectionwith the valuesalphaandbeta, and the entry keydevand entry valueCollectionwith the valuelocal, considering the configuration name asserver.env, the key type as aString, and the property type as aString.The keyed indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value typeC- the collection type- Parameters:
name- The configuration property name to look for in the configurationkeyClass- The type into which the resolved property keys are convertedvalueClass- The type into which the resolved property values are convertedcollectionFactory- the resulting instance of aCollectionto return the property values- Returns:
- the resolved property values as a
Mapof keys of the property name and values as aCollectionsof instances of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getValues
public <K,V, Map<K,C extends Collection<V>> C> getValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter, IntFunction<Map<K, C>> mapFactory, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed indexed properties. A keyed indexed property uses the original property name plus an additional dotted segment to represent aMapkey followed by square brackets and an index in between, asmy.property.key[0], wheremy.propertyis the property name,keyis theMapkey and {code [0]} the index of theCollectionelement. All keyed indexed properties are queried for their value, which represent a single entry in the returningMap, and single element in theCollectionvalue, converting both the key and value using the specified Converters. The following configuration:- server.env.prod[0]=alpha
- server.env.prod[1]=beta
- server.env.dev[0]=local
Results in a
Mapwith the entry keyprodand entry valueCollectionwith the valuesalphaandbeta, and the entry keydevand entry valueCollectionwith the valuelocal, considering the configuration name asserver.envand Converters to convert the key type as aStringand the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;and value as a comma-separated string (,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofserver.env=prod=alpha,beta;dev=localresults in aMapwith the entry keyprodand entry valueCollectionwith the valuesalphaandbeta, and the entry keydevand entry valueCollectionwith the valuelocal, considering the configuration name asserver.env, and Converters to convert the key type as aStringand the property type as aString.The keyed indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value typeC- the collection type- Parameters:
name- The configuration property name to look for in the configurationkeyConverter- TheConverterto use to convert the resolved property keysvalueConverter- TheConverterto use to convert the resolved property valuesmapFactory- the resulting instance of aMapto return the property keys and valuescollectionFactory- the resulting instance of aCollectionto return the property values- Returns:
- the resolved property values as a
Mapof keys of the property name and values as aCollectionsof instances of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getMapKeys
-
getMapIndexedKeys
-
getValue
Returns the value for the specified configuration name from the underlying configuration sources.If the requested type is a type array, the lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returning type array converted to their specified property type. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in an array with the elements
dog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in an array with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Specified by:
getValuein interfaceorg.eclipse.microprofile.config.Config- Type Parameters:
T- the property type- Parameters:
name- The configuration property name to look for in the configurationpropertyType- The type into which the resolved property value is converted- Returns:
- the resolved property value as an instance of the property type
- Throws:
IllegalArgumentException- if the property values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getValue
Returns the value for the specified configuration name from the underlying configuration sources.If the requested type is a type array, the lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returning type array converted by the specifiedConverter. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in an array with the elements
dog,cat, andturtle, considering the configuration name asmy.propertyand theConverterto convert the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in an array with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand theConverterto convert the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
T- the property type- Parameters:
name- The configuration property name to look for in the configurationconverter- TheConverterto use to convert the resolved property value- Returns:
- the resolved property value as an instance of the property type
- Throws:
IllegalArgumentException- if the property values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
convertValue
public <T> T convertValue(ConfigValue configValue, org.eclipse.microprofile.config.spi.Converter<T> converter) -
getConfigValue
Returns theConfigValuefor the specified configuration name from the underlying configuration sources.The lookup of the configuration is performed immediately, meaning that calls to
ConfigValuewill always yield the same results.A
ConfigValueis always returned even if a property name cannot be found. In this case, every method inConfigValuereturnsnull, or the default value for primitive types, except forConfigValue.getName(), which includes the original property name being looked up.- Specified by:
getConfigValuein interfaceorg.eclipse.microprofile.config.Config- Parameters:
name- The configuration property name to look for in the configuration- Returns:
- the resolved property value as a
ConfigValue
-
getRawValue
Deprecated. -
getOptionalValue
Returns the value for the specified configuration name from the underlying configuration sources.If the requested type is a type array, the lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returning type array converted to their specified property type. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in an array with the elements
dog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in an array with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Specified by:
getOptionalValuein interfaceorg.eclipse.microprofile.config.Config- Type Parameters:
T- the property type- Parameters:
name- The configuration property name to look for in the configurationpropertyType- The type into which the resolved property value is converted- Returns:
- the resolved property value as a
Optionalinstance of the property type - Throws:
IllegalArgumentException- if the property values cannot be converted to the specified type- See Also:
-
getOptionalValue
public <T> Optional<T> getOptionalValue(String name, org.eclipse.microprofile.config.spi.Converter<T> converter) Returns the value for the specified configuration name from the underlying configuration sources.If the requested type is a type array, the lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returning type array converted by the specifiedConverter. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in an array with the elements
dog,cat, andturtle, considering the configuration name asmy.propertyand theConverterto convert the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in an array with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand theConverterto convert the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
T- the property type- Parameters:
name- The configuration property name to look for in the configurationconverter- TheConverterto use to convert the resolved property value- Returns:
- the resolved property value as a
Optionalinstance of the property type - Throws:
IllegalArgumentException- if the property values cannot be converted to the specified type- See Also:
-
getOptionalValues
Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returningOptional<List>converted to their specified property type. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in an
Optional<List>with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in aOptional<List>with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Specified by:
getOptionalValuesin interfaceorg.eclipse.microprofile.config.Config- Type Parameters:
T- the item type- Parameters:
name- The configuration property name to look for in the configurationpropertyType- The type into which the resolved property values are converted- Returns:
- the resolved property values as a
Optional<List>of instances of the property type - Throws:
IllegalArgumentException- if the property values cannot be converted to the specified type- See Also:
-
getOptionalValues
public <T,C extends Collection<T>> Optional<C> getOptionalValues(String name, Class<T> itemClass, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returningOptional<Collection>converted to their specified property type. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in a
Optional<Collection>with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in aOptional<Collection>with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
T- the item typeC- the collection type- Parameters:
name- The configuration property name to look for in the configurationitemClass- The type into which the resolved property values are convertedcollectionFactory- the resulting instance of aCollectionto return the property values- Returns:
- the resolved property values as a
Optional<Collection>of instances of the property type - Throws:
IllegalArgumentException- if the property values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getOptionalValues
public <T,C extends Collection<T>> Optional<C> getOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for indexed properties. An indexed property uses the original property name with square brackets and an index in between, asmy.property[0]. All indexed properties are queried for their value, which represents a single element in the returningOptional<Collection>converted by the specifiedConverter. The following configuration:- my.property[0]=dog
- my.property[1]=cat
- my.property[2]=turtle
Results in a
Optional<Collection>with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.Otherwise, the configuration value is a single element that a comma-separated string (
,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofmy.property=dog,cat,turtleresults in aOptional<Collection>with the elementsdog,cat, andturtle, considering the configuration name asmy.propertyand the property type as aString.The indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
T- the item typeC- the collection type- Parameters:
name- The configuration property name to look for in the configurationconverter- TheConverterto use to convert the resolved property valuescollectionFactory- the resulting instance of aCollectionto return the property values- Returns:
- the resolved property values as a
Optional<Collection>of instances of the property type - Throws:
IllegalArgumentException- if the property values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getIndexedOptionalValues
@Deprecated(forRemoval=true) public <T,C extends Collection<T>> Optional<C> getIndexedOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory) Deprecated, for removal: This API element is subject to removal in a future version. -
getOptionalValues
public <K,V> Optional<Map<K,V>> getOptionalValues(String name, Class<K> keyClass, Class<V> valueClass) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed properties. A keyed property uses the original property name plus an additional dotted segment to represent aMapkey, asmy.property.key, wheremy.propertyis the property name andkeyis theMapkey. All keyed properties are queried for their values, which represent a single entry in the returningOptional<Map>converting both the key and value to their specified types. The following configuration:- server.reasons.200=OK
- server.reasons.201=CREATED
- server.reasons.404=NOT_FOUND
Results in a
Optional<Map>with the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasons, the key type asIntegerand the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;with the backslash (\) as the escape character. A configuration ofserver.reasons=200=OK;201=CREATED;404=NOT_FOUNDresults in aOptional<Map>with the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasons, the key type asIntegerand the property type as aString.The keyed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value type- Parameters:
name- The configuration property name to look for in the configurationkeyClass- The type into which the resolved property keys are convertedvalueClass- The type into which the resolved property values are converted- Returns:
- the resolved property values as a
Optional<Map>of keys of the property name and values of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getOptionalValues
public <K,V> Optional<Map<K,V>> getOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed properties. A keyed property uses the original property name plus an additional dotted segment to represent aMapkey, asmy.property.key, wheremy.propertyis the property name andkeyis theMapkey. All keyed properties are queried for their values, which represent a single entry in the returningOptional<Map>converting both the key and value using the specified Converters. The following configuration:- server.reasons.200=OK
- server.reasons.201=CREATED
- server.reasons.404=NOT_FOUND
Results in a
Optional<Map>with the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasonsand Converters to convert the key type as anIntegerand the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;with the backslash (\) as the escape character. A configuration ofserver.reasons=200=OK;201=CREATED;404=NOT_FOUNDresults in aOptional<Map>with the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasonsand Converters to convert the key type as anIntegerand the property type as aString.The keyed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value type- Parameters:
name- The configuration property name to look for in the configurationkeyConverter- TheConverterto use to convert the resolved property keysvalueConverter- TheConverterto use to convert the resolved property values- Returns:
- the resolved property values as a
Optional<Map>of keys of the property name and values of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getOptionalValues
public <K,V> Optional<Map<K,V>> getOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter, IntFunction<Map<K, V>> mapFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed properties. A keyed property uses the original property name plus an additional dotted segment to represent aMapkey, asmy.property.key, wheremy.propertyis the property name andkeyis theMapkey. All keyed properties are queried for their values, which represent a single entry in the returningOptional<Map>converting both the key and value using the specified Converters. The following configuration:- server.reasons.200=OK
- server.reasons.201=CREATED
- server.reasons.404=NOT_FOUND
Results in a
Optional<Map>with the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasonsand Converters to convert the key type as anIntegerand the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;with the backslash (\) as the escape character. A configuration ofserver.reasons=200=OK;201=CREATED;404=NOT_FOUNDresults in aOptional<Map>with the entries200=OK,201=CREATED, and404=NOT_FOUND, considering the configuration name asserver.reasonsand Converters to convert the key type as anIntegerand the property type as aString.The keyed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value type- Parameters:
name- The configuration property name to look for in the configurationkeyConverter- TheConverterto use to convert the resolved property keysvalueConverter- TheConverterto use to convert the resolved property valuesmapFactory- the resulting instance of aMapto return the property keys and values- Returns:
- the resolved property values as a
Optional<Map>of keys of the property name and values of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified typeNoSuchElementException- if the property isn't present in the configuration or is defined as an empty string, or the converter returnsnull- See Also:
-
getOptionalValues
public <K,V, Optional<Map<K,C extends Collection<V>> C>> getOptionalValues(String name, Class<K> keyClass, Class<V> valueClass, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed indexed properties. A keyed indexed property uses the original property name plus an additional dotted segment to represent aMapkey followed by square brackets and an index in between, asmy.property.key[0], wheremy.propertyis the property name,keyis theMapkey and {code [0]} the index of theCollectionelement. All keyed indexed properties are queried for their value, which represent a single entry in the returningOptional<Map>, and single element in theCollectionvalue, converting both the key and value to their specified types. The following configuration:- server.env.prod[0]=alpha
- server.env.prod[1]=beta
- server.env.dev[0]=local
Results in a
Optional<Map>with the entry keyprodand entry valueCollectionwith the valuesalphaandbeta, and the entry keydevand entry valueCollectionwith the valuelocal, considering the configuration name asserver.env, the key type as aString, and the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;and value as a comma-separated string (,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofserver.env=prod=alpha,beta;dev=localresults in aOptional<Map>with the entry keyprodand entry valueCollectionwith the valuesalphaandbeta, and the entry keydevand entry valueCollectionwith the valuelocal, considering the configuration name asserver.env, the key type as aString, and the property type as aString.The keyed indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value typeC- the collection type- Parameters:
name- The configuration property name to look for in the configurationkeyClass- The type into which the resolved property keys are convertedvalueClass- The type into which the resolved property values are convertedcollectionFactory- the resulting instance of aCollectionto return the property values- Returns:
- the resolved property values as a
Optional<Map>of keys of the property name and values as aCollectionsof instances of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified type- See Also:
-
getOptionalValues
public <K,V, Optional<Map<K,C extends Collection<V>> C>> getOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<K> keyConverter, org.eclipse.microprofile.config.spi.Converter<V> valueConverter, IntFunction<Map<K, C>> mapFactory, IntFunction<C> collectionFactory) Returns the values for the specified configuration name from the underlying configuration sources.The lookup to the configuration will first query
getPropertyNames()for keyed indexed properties. A keyed indexed property uses the original property name plus an additional dotted segment to represent aMapkey followed by square brackets and an index in between, asmy.property.key[0], wheremy.propertyis the property name,keyis theMapkey and {code [0]} the index of theCollectionelement. All keyed indexed properties are queried for their value, which represent a single entry in the returningOptional<Map>, and single element in theCollectionvalue, converting both the key and value using the specified Converters. The following configuration:- server.env.prod[0]=alpha
- server.env.prod[1]=beta
- server.env.dev[0]=local
Results in a
Optional<Map>with the entry keyprodand entry valueCollectionwith the valuesalphaandbeta, and the entry keydevand entry valueCollectionwith the valuelocal, considering the configuration name asserver.envand Converters to convert the key type as aStringand the property type as aString.Otherwise, the configuration value is a single element represented by key value pairs as
<key1>=<value1>;<key2>=<value2>...separated by a semicolon;and value as a comma-separated string (,) can represent, and split into multiple elements with the backslash (\) as the escape character. A configuration ofserver.env=prod=alpha,beta;dev=localresults in aOptional<Map>with the entry keyprodand entry valueCollectionwith the valuesalphaandbeta, and the entry keydevand entry valueCollectionwith the valuelocal, considering the configuration name asserver.env, and Converters to convert the key type as aStringand the property type as aString.The keyed indexed property format has priority when both styles are found in the same configuration source. When available in multiple sources, the higher ordinal source wins, like any other configuration lookup.
- Type Parameters:
K- the key typeV- the value typeC- the collection type- Parameters:
name- The configuration property name to look for in the configurationkeyConverter- TheConverterto use to convert the resolved property keysvalueConverter- TheConverterto use to convert the resolved property valuesmapFactory- the resulting instance of aMapto return the property keys and valuescollectionFactory- the resulting instance of aCollectionto return the property values- Returns:
- the resolved property values as a
Optional<Map>of keys of the property name and values as aCollectionsof instances of the property type - Throws:
IllegalArgumentException- if the property keys or values cannot be converted to the specified type- See Also:
-
getConfigMapping
Returns an instance of aConfigMappingannotated type, mapping all the configuration names matching theConfigMapping.prefix()and theConfigMappingmembers to values from the underlying configuration sources.ConfigMapping instances are cached. They are populated when the
SmallRyeConfiginstance is initialized and their values are not updated on configuration sources changes.- Type Parameters:
T- the type of theConfigMapping- Parameters:
type- an interface annotated withConfigMapping- Returns:
- an instance of a
ConfigMappingannotated type - Throws:
ConfigValidationException- if the mapping names or values cannot be converter to the specified types, if the properties values are not present, defined as an empty string, or the conversion returnsnull- See Also:
-
getConfigMapping
Returns an instance of aConfigMappingannotated type, mapping all the configuration names matching the prefix and theConfigMappingmembers to values from the underlying configuration sources.ConfigMapping instances are cached. They are populated when the
SmallRyeConfiginstance is initialized and their values are not updated on configuration sources changes.- Type Parameters:
T- the type of theConfigMapping- Parameters:
type- an interface annotated withConfigMappingprefix- the prefix to overrideConfigMapping.prefix()- Returns:
- an instance of a
ConfigMappingannotated type - Throws:
ConfigValidationException- if the mapping names or values cannot be converter to the specified types, if the properties values are not present, defined as an empty string, or the conversion returnsnull- See Also:
-
getPropertyNames
This implementation caches the list of property names collected whenSmallRyeConfigis built viaSmallRyeConfigBuilder.build(). The cache may be disabled withSmallRyeConfigBuilder.isCachePropertyNames().- Specified by:
getPropertyNamesin interfaceorg.eclipse.microprofile.config.Config- Returns:
- the cached names of all configured keys of the underlying configuration
- See Also:
-
getLatestPropertyNames
Provides a way to retrieve an updated list of all property names. The updated list replaces the cached list returned bygetPropertyNames().- Returns:
- the names of all configured keys of the underlying configuration
-
isPropertyPresent
Checks if a property is present in theConfiginstance.
BecauseConfigSource.getPropertyNames()may not include all available properties, it is not possible to reliably determine if the property is present in the properties list. The property needs to be retrieved to make sure it exists. The lookup is done without expression expansion, because the expansion value may not be available, and it is not relevant for the final check.- Parameters:
name- the property name.- Returns:
- true if the property is present or false otherwise.
-
getConfigSources
- Specified by:
getConfigSourcesin interfaceorg.eclipse.microprofile.config.Config
-
getConfigSources
Return the currently registered configuration sources inSmallRyeConfigthat match the specified typeThe returned sources will be sorted by descending ordinal value and name, which can be iterated in a thread-safe manner. The
Iterablecontains a fixed number of configuration sources, determined at configuration initialization, and the config sources themselves may be static or dynamic.- Parameters:
type- The type of theConfigSourceto look for in the configuration- Returns:
- an
Iterableof configuration sources
-
getConfigSource
Return the first registered configuration sources inSmallRyeConfigthat match the specified name, sorted by descending ordinal value and name. -
convert
Deprecated. -
getConverter$$bridge
@Deprecated public <T> org.eclipse.microprofile.config.spi.Converter<T> getConverter$$bridge(Class<T> asType) Deprecated. -
getConverter
- Specified by:
getConverterin interfaceorg.eclipse.microprofile.config.Config
-
requireConverter
Return theConverterused by this instance to produce instances of the specified type fromStringvalues.- Type Parameters:
T- the conversion type- Parameters:
asType- the type to be produced by the converter- Returns:
- an instance of the
Converterthe specified type - Throws:
IllegalArgumentException- if noConverteris registered for the specified type
-
unwrap
- Specified by:
unwrapin interfaceorg.eclipse.microprofile.config.Config
-
getProfiles
Returns aListof the active profiles inSmallRyeConfig.Profiles are sorted in reverse order according to how they were set in
SMALLRYE_CONFIG_PROFILE, as the last profile overrides the previous one until there are no profiles left in the list.- Returns:
- a
Listof the active profiles
-