Interface RewardReportService
-
public interface RewardReportServiceA storage service to save/load reward settings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RewardReportcomputeRewards(LocalDate localDate)Compute rewards swicth configurations for the list of identities passed in parametersdoublecountRewards(String currentUser)List<RewardPeriod>getRewardPeriodsInProgress()List<RewardPeriod>getRewardPeriodsNotSent()RewardReportgetRewardReport(LocalDate localDate)Retrieve aRewardReportcorresponding to a period of timeList<WalletReward>listRewards(String currentUser, int limit)voidreplaceRewardTransactions(String oldHash, String newHash)Replaces an old reward transaction hash to a new one, that had boosted the first onevoidsaveRewardReport(RewardReport rewardReport)voidsendRewards(LocalDate localDate, String username)Send rewards transactions
-
-
-
Method Detail
-
computeRewards
RewardReport computeRewards(LocalDate localDate)
Compute rewards swicth configurations for the list of identities passed in parameters- Parameters:
localDate- aLocalDateinside the period time that will be retrieved- Returns:
- a
SetofWalletRewardwith the details of sent tokens and tokens to send
-
sendRewards
void sendRewards(LocalDate localDate, String username) throws Exception
Send rewards transactions
-
getRewardReport
RewardReport getRewardReport(LocalDate localDate)
Retrieve aRewardReportcorresponding to a period of time- Parameters:
localDate- aLocalDateinside the period time that will be retrieved- Returns:
RewardReportif there is a saved one, else null
-
saveRewardReport
void saveRewardReport(RewardReport rewardReport)
- Parameters:
rewardReport- save generated reward report
-
getRewardPeriodsInProgress
List<RewardPeriod> getRewardPeriodsInProgress()
- Returns:
- a
ListofRewardPeriodthat are in progress
-
getRewardPeriodsNotSent
List<RewardPeriod> getRewardPeriodsNotSent()
-
listRewards
List<WalletReward> listRewards(String currentUser, int limit)
- Parameters:
currentUser- current user listing his rewardslimit- size limit of items to return- Returns:
- a
ListofWalletRewardof current user
-
countRewards
double countRewards(String currentUser)
- Parameters:
currentUser- the current user listing his rewards- Returns:
- a total rewards sent for current person
-
-