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, 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, 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 calculationreferenceDateTime- the reference datetime used to calculate the timeframe- Returns:
- the start and end date of the permission
-