Package org.itsallcode.whiterabbit.api
Interface PluginConfiguration
-
public interface PluginConfigurationThe configuration of aPluginthat allows retrieving configuration values from the WhiteRabbit properties file~/.whiterabbit.properties.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.nio.file.PathgetDataDir()java.lang.StringgetMandatoryValue(java.lang.String propertyName)Get propertypluginId.propertyNamefrom the config file.java.util.Optional<java.lang.String>getOptionalValue(java.lang.String propertyName)Get propertypluginId.propertyNamefrom the config file.
-
-
-
Method Detail
-
getMandatoryValue
java.lang.String getMandatoryValue(java.lang.String propertyName)
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:
java.lang.RuntimeException- if the property is not available in the config file.
-
getOptionalValue
java.util.Optional<java.lang.String> getOptionalValue(java.lang.String propertyName)
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
java.nio.file.Path getDataDir()
-
-