Interface IDataHandler<I,O>

All Known Subinterfaces:
IValidatingDataHandler
All Known Implementing Classes:
AbstractDataHandler, DOMDataHandler, PropertiesDataHandler

public interface IDataHandler<I,O>
Configuration data handler.
Author:
POLARION SOFTWARE
See Also:
  • Method Details

    • readLocations

      @Nullable O readLocations(@NotNull List<ILocation> locations, @NotNull IDataHandlerContext context)
      Read configuration from given locations Merges the hierarchy of configurations into one
      Parameters:
      locations - The config hierarchy. The first location is the most concrete, following elements are more and more generic. The caller ensures, that only relevant configurations are passed in.

      Empty locations means, there is no valid file. In such a case either null or default config can be returned.

      context - context
      Returns:
      merged configuration object
      Since:
      3.1.2
    • readLocation

      @Nullable O readLocation(@NotNull ILocation location, @NotNull IDataHandlerContext context)
      Reads the location in the form suitable to be passed to writeLocation(ILocation, Object, IDataHandlerContext)
      Parameters:
      location - The location, never null.
      context - context
      Returns:
      the data read from the specified location
      Since:
      3.1.2
    • writeLocation

      void writeLocation(@NotNull ILocation location, @NotNull I data, @NotNull IDataHandlerContext context)
      Writes data to given location.
      Parameters:
      location - The location, never null.
      data - Data as created by the user or by readLocation(ILocation, IDataHandlerContext).
      context - context
      Since:
      3.1.2