Interface SourceProperties

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Properties getProperties()
      Properties to configure the source.
      java.lang.String getProperty​(java.lang.String name)
      Obtains a required property value.
      java.lang.String getProperty​(java.lang.String name, java.lang.String defaultValue)
      Obtains the property value or subsequently the default value.
      java.lang.String[] getPropertyNames()
      Obtains the names of the available properties in the order they were defined.
    • Method Detail

      • getPropertyNames

        java.lang.String[] getPropertyNames()

        Obtains the names of the available properties in the order they were defined. This allows for ability to provide variable number of properties identified by a naming convention and being able to maintain their order.

        An example would be providing a listing of routing configurations, each entry named route.[something] and order indicating priority.

        Returns:
        Names of the properties in the order defined.
      • getProperty

        java.lang.String getProperty​(java.lang.String name)
                              throws UnknownPropertyError
        Obtains a required property value.
        Parameters:
        name - Name of the property.
        Returns:
        Value of the property.
        Throws:
        UnknownPropertyError - If property was not configured. Let this propagate as OfficeFloor will handle it.
      • getProperty

        java.lang.String getProperty​(java.lang.String name,
                                     java.lang.String defaultValue)
        Obtains the property value or subsequently the default value.
        Parameters:
        name - Name of the property.
        defaultValue - Default value if property not specified.
        Returns:
        Value of the property or the the default value if not specified.
      • getProperties

        java.util.Properties getProperties()
        Properties to configure the source.
        Returns:
        Properties specific for the source.