Class PermissionEndIsEnergyDataEndStrategy
java.lang.Object
energy.eddie.regionconnector.shared.services.data.needs.calculation.strategies.PermissionEndIsEnergyDataEndStrategy
- All Implemented Interfaces:
PermissionTimeframeStrategy
public class PermissionEndIsEnergyDataEndStrategy
extends Object
implements PermissionTimeframeStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionpermissionTimeframe(Timeframe energyDataTimeframe, DataNeed dataNeed, ZonedDateTime referenceDateTime) Calculates that timeframe of the permission that is needed to request all energy data in its timeframe.
-
Constructor Details
-
PermissionEndIsEnergyDataEndStrategy
public PermissionEndIsEnergyDataEndStrategy()
-
-
Method Details
-
permissionTimeframe
public Timeframe permissionTimeframe(@Nullable Timeframe energyDataTimeframe, @Nullable DataNeed dataNeed, ZonedDateTime referenceDateTime) Calculates that timeframe of the permission that is needed to request all energy data in its timeframe. For example, past energy data can be requested in one day, but future energy data needs permission to request it until the end of the energy data timeframe.- Specified by:
permissionTimeframein interfacePermissionTimeframeStrategy- Parameters:
energyDataTimeframe- the energy data timeframe that is the basis of the calculationdataNeed- DataNeed that is used as the basis of the calculation, not required for this implementationreferenceDateTime- the reference datetime used to calculate the timeframe- Returns:
- the start and end date of the permission
-