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) findRewardReportPeriods(int offset, int limit) Retrieves the list of periods sorted descending by start dategetRewardPeriod(RewardPeriodType periodType, LocalDate date) Return the stored reward period associated to select period type and dategetRewardReport(LocalDate localDate) Retrieve aRewardReportcorresponding to a period of timegetRewardReportByPeriodId(long periodId) Retrieve aRewardReportcorresponding to a period identified by its idbooleanlistRewards(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
-
getRewardPeriod
Return the stored reward period associated to select period type and date- Parameters:
periodType-RewardPeriodTypedate-LocalDate- Returns:
RewardPeriod
-
getRewardReportByPeriodId
Retrieve aRewardReportcorresponding to a period identified by its id- Parameters:
periodId- technical identifier ofRewardPeriod- Returns:
RewardReport
-
saveRewardReport
- Parameters:
rewardReport- save generated reward report
-
isRewardSendingInProgress
boolean isRewardSendingInProgress()- Returns:
- true if reward sending status storage is in progress, else return false
-
getRewardPeriodsInProgress
List<RewardPeriod> getRewardPeriodsInProgress()- Returns:
- a
ListofRewardPeriodthat are in progress
-
getRewardPeriodsNotSent
List<RewardPeriod> getRewardPeriodsNotSent() -
findRewardReportPeriods
Retrieves the list of periods sorted descending by start date- Parameters:
offset- offset of querylimit- limit of results- Returns:
ListofRewardPeriod
-
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
-