Interface PluginConfiguration


  • public interface PluginConfiguration
    The configuration of a Plugin that 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.Path getDataDir()  
      java.lang.String getMandatoryValue​(java.lang.String propertyName)
      Get property pluginId.propertyName from the config file.
      java.util.Optional<java.lang.String> getOptionalValue​(java.lang.String propertyName)
      Get property pluginId.propertyName from the config file.
    • Method Detail

      • getMandatoryValue

        java.lang.String getMandatoryValue​(java.lang.String propertyName)
        Get property pluginId.propertyName from 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 property pluginId.propertyName from 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()