Package com.suse.common.configuration
Interface ConfigurationSource
-
- All Known Implementing Classes:
BaseConfigurationSource,EnvironmentConfigurationSource,FileConfigurationSource,MultipleConfigurationSource,ResourceConfigurationSource
public interface ConfigurationSource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<java.lang.Boolean>getBoolean(java.lang.String property)Retrieve the boolean value of a property.java.util.Optional<java.lang.Double>getDouble(java.lang.String property)Retrieve the double value of a property.java.util.Optional<java.lang.Float>getFloat(java.lang.String property)Retrieve the float value of a property.java.util.Optional<java.lang.Integer>getInteger(java.lang.String property)Retrieve the integer value of a property.<T> java.util.Optional<java.util.List<T>>getList(java.lang.String property, java.lang.Class<T> itemClass)Retrieve the list value of a property.java.util.Optional<java.lang.Long>getLong(java.lang.String property)Retrieve the long value of a property.java.util.Set<java.lang.String>getPropertyNames()Retrieves the names of all the available properties.java.util.Optional<java.lang.String>getString(java.lang.String property)Retrieve the string value of a property.java.util.PropertiestoProperties()Converts this configuration source to aPropertiesobject.
-
-
-
Method Detail
-
getBoolean
java.util.Optional<java.lang.Boolean> getBoolean(java.lang.String property)
Retrieve the boolean value of a property.- Parameters:
property- the property name- Returns:
- the boolean wrapped into an
Optional
-
getString
java.util.Optional<java.lang.String> getString(java.lang.String property)
Retrieve the string value of a property.- Parameters:
property- the property name- Returns:
- the string wrapped into an
Optional
-
getInteger
java.util.Optional<java.lang.Integer> getInteger(java.lang.String property)
Retrieve the integer value of a property.- Parameters:
property- the property name- Returns:
- the integer wrapped into an
Optional
-
getLong
java.util.Optional<java.lang.Long> getLong(java.lang.String property)
Retrieve the long value of a property.- Parameters:
property- the property name- Returns:
- the long wrapped into an
Optional
-
getFloat
java.util.Optional<java.lang.Float> getFloat(java.lang.String property)
Retrieve the float value of a property.- Parameters:
property- the property name- Returns:
- the float wrapped into an
Optional
-
getDouble
java.util.Optional<java.lang.Double> getDouble(java.lang.String property)
Retrieve the double value of a property.- Parameters:
property- the property name- Returns:
- the double wrapped into an
Optional
-
getList
<T> java.util.Optional<java.util.List<T>> getList(java.lang.String property, java.lang.Class<T> itemClass)Retrieve the list value of a property.- Type Parameters:
T- the type of item of the list- Parameters:
property- the property nameitemClass- the type of item of the list.- Returns:
- the list wrapped into an
Optional
-
getPropertyNames
java.util.Set<java.lang.String> getPropertyNames()
Retrieves the names of all the available properties.- Returns:
- the set of property names
-
toProperties
java.util.Properties toProperties()
Converts this configuration source to aPropertiesobject.- Returns:
- all the properties value stored into
Propertiesobject
-
-