Interface RewardReportService
public interface RewardReportService
A storage service to save/load reward settings
-
Method Summary
Modifier and TypeMethodDescriptioncomputeRewards(LocalDate localDate) Compute rewards swicth configurations for the list of identities passed in parameterscomputeRewardsByUser(LocalDate localDate, long userIdentityId) Compute rewards By UserdoublecountRewards(String currentUser) getRewardReport(LocalDate localDate) Retrieve aRewardReportcorresponding to a period of timelistRewards(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 Details
-
computeRewards
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
-
computeRewardsByUser
Compute rewards By User- Parameters:
localDate- aLocalDateinside the period time that will be retrieveduserIdentityId- User technical identifier (Identity.getId())- Returns:
- a
SetofWalletRewardwith the details of sent tokens and tokens to send
-
sendRewards
Send rewards transactions -
getRewardReport
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
- Parameters:
rewardReport- save generated reward report
-
getRewardPeriodsInProgress
List<RewardPeriod> getRewardPeriodsInProgress()- Returns:
- a
ListofRewardPeriodthat are in progress
-
getRewardPeriodsNotSent
List<RewardPeriod> getRewardPeriodsNotSent() -
listRewards
- Parameters:
currentUser- current user listing his rewardslimit- size limit of items to return- Returns:
- a
ListofWalletRewardof current user
-
countRewards
- Parameters:
currentUser- the current user listing his rewards- Returns:
- a total rewards sent for current person
-
replaceRewardTransactions
Replaces an old reward transaction hash to a new one, that had boosted the first one- Parameters:
oldHash- old Transaction hashnewHash- new Transaction hash
-