Package org.itsallcode.whiterabbit.api
Interface PluginConfiguration
public interface PluginConfiguration
The configuration of a
Plugin that allows retrieving configuration
values from the WhiteRabbit properties file
~/.whiterabbit.properties.-
Method Summary
Modifier and TypeMethodDescriptionGet thePathto the data directory.getMandatoryValue(String propertyName) Get propertypluginId.propertyNamefrom the config file.getOptionalValue(String propertyName) Get propertypluginId.propertyNamefrom the config file.
-
Method Details
-
getMandatoryValue
Get propertypluginId.propertyNamefrom the config file. Throws an exception if the property is not available.- Parameters:
propertyName- the property name to get.- Returns:
- the value of the property.
- Throws:
RuntimeException- if the property is not available in the config file.
-
getOptionalValue
Get propertypluginId.propertyNamefrom the config file. If the property is not available then return empty Optional.- Parameters:
propertyName- the property name to get.- Returns:
- the value of the property.
-
getDataDir
Path getDataDir()Get thePathto the data directory.- Returns:
- the
Pathto the data directory.
-