Interface DataNeedCalculationService<T extends DataNeedInterface>

Type Parameters:
T - Should always be DataNeed, but this is only available in the core itself.
All Known Implementing Classes:
DataNeedCalculationServiceImpl

public interface DataNeedCalculationService<T extends DataNeedInterface>
Used to by a region-connector to calculate start and end data of a data need, as well as reporting if it supports a certain data need.
  • Method Details

    • calculate

      DataNeedCalculationResult calculate(T dataNeed)
      Calculates relevant information for a data need
      Parameters:
      dataNeed - the data need
      Returns:
      the calculation results for the data need
    • calculate

      DataNeedCalculationResult calculate(T dataNeed, ZonedDateTime referenceDateTime)
      Calculates relevant information for a data need, using the reference datetime
      Parameters:
      dataNeed - the data need
      referenceDateTime - the reference datetime the calculations are based on
      Returns:
      the calculation results for the data need
    • calculate

      DataNeedCalculationResult calculate(String dataNeedId)
      Calculate relevant information for a given data need ID
      Parameters:
      dataNeedId - the ID of the data need
      Returns:
      the calculation results for the data need
    • calculate

      DataNeedCalculationResult calculate(String dataNeedId, ZonedDateTime referenceDateTime)
      Calculates relevant information for given data need ID, using the reference datetime
      Parameters:
      dataNeedId - the ID of the data need
      referenceDateTime - the reference datetime the calculations are based on
      Returns:
      the calculation results for the data need
    • calculateAll

      MultipleDataNeedCalculationResult calculateAll(Set<String> dataNeedIds)
      Calculates the relevant information for multiple given data need IDs.
      Parameters:
      dataNeedIds - the ID of the data needs
      Returns:
      a Map of the calculations, where the key is the data need ID and the value the calculation result.
    • calculateAll

      MultipleDataNeedCalculationResult calculateAll(Set<String> dataNeedIds, ZonedDateTime referenceDateTime)
      Calculates the relevant information for multiple given data need IDs, using the reference datetime.
      Parameters:
      dataNeedIds - the ID of the data needs
      referenceDateTime - the reference datetime the calculations are based on
      Returns:
      a Map of the calculations, where the key is the data need ID and the value the calculation result.
    • regionConnectorId

      String regionConnectorId()
      The id of the region-connector that provides the implementation of this service.
      Returns:
      region-connector id