Interface PropertyService
public interface PropertyService
Interface for a service that reads configuration properties in several formats
-
Method Summary
Modifier and TypeMethodDescriptionreadInteger(String key) Returns the integer value for the given keyintreadInteger(String key, int defaultValue) Returns the integer value for the given keyReturns a map containing all configured key-value pairs for the given keyReturns the string values for the given key.readString(String key) Returns the string value for the given key
-
Method Details
-
readString
-
readMultiValueString
-
readInteger
Returns the integer value for the given key- Parameters:
key- the name of the property to read- Returns:
- the value for the given key, or null if the key cannot be resolved or the value is empty
- Throws:
IllegalArgumentException- in case the value can not be converted to an integer
-
readInteger
Returns the integer value for the given key- Parameters:
key- the name of the property to readdefaultValue- the value to return if the key cannot be resolved or the value is empty- Returns:
- the value for the given key, or defaultValue if the key cannot be resolved or the value is empty
- Throws:
IllegalArgumentException- in case the value can not be converted to an integer
-
readMap
-