public class GamificationService extends Object
| Modifier and Type | Field and Description |
|---|---|
protected GamificationHistoryDAO |
gamificationHistoryDAO |
| Constructor and Description |
|---|
GamificationService(org.exoplatform.social.core.manager.IdentityManager identityManager,
org.exoplatform.social.core.space.spi.SpaceService spaceService,
GamificationHistoryDAO gamificationHistoryDAO,
DomainMapper domainMapper,
RuleService ruleService) |
| Modifier and Type | Method and Description |
|---|---|
GamificationActionsHistory |
build(RuleDTO ruleDto,
String actor,
String receiver,
String objectId) |
List<ProfileReputation> |
buildDomainScoreByIdentityId(String earnerId)
Compute User reputation score by Domain
|
List<PiechartLeaderboard> |
buildStatsByUser(String earnerId,
Date startDate,
Date endDate)
Build stats dashboard of a given user (based on domain)
|
long |
computeTotalScore(String actorIdentityId) |
void |
createHistory(String event,
String sender,
String receiver,
String object) |
List<StandardLeaderboard> |
filter(LeaderboardFilter filter)
Filter Leaderboard logic (filter by Domain or/and by period)
|
List<GamificationActionsHistory> |
findActionHistoryByDateByEarnerId(Date date,
String earnerId)
Get actionsHistory entities
|
List<GamificationActionsHistory> |
findActionsHistoryByEarnerId(String earnerId,
int limit)
Provided as an API from points n list to find gamification history from the
GamificationInformationsPortlet's earner earned points by date
|
List<StandardLeaderboard> |
findAllLeaderboardBetweenDate(IdentityType earnedType,
Date fromDate,
Date toDate) |
GamificationActionsHistory |
findLatestActionHistoryByEarnerId(String earnerId) |
long |
findReputationByEarnerId(String earnerId)
Compute reputation's score
|
long |
findUserReputationScoreBetweenDate(String earnerId,
Date fromDate,
Date toDate) |
long |
findUserReputationScoreByDomainBetweenDate(String earnerId,
String domain,
Date fromDate,
Date toDate) |
long |
findUserReputationScoreByMonth(String earnerId,
Date currentMonth) |
int |
getLeaderboardRank(String earnerId,
Date date,
String domain) |
void |
saveActionHistory(GamificationActionsHistory history)
Save a GamificationActionsHistory in DB
|
protected final GamificationHistoryDAO gamificationHistoryDAO
public GamificationService(org.exoplatform.social.core.manager.IdentityManager identityManager,
org.exoplatform.social.core.space.spi.SpaceService spaceService,
GamificationHistoryDAO gamificationHistoryDAO,
DomainMapper domainMapper,
RuleService ruleService)
public List<GamificationActionsHistory> findActionHistoryByDateByEarnerId(Date date, String earnerId)
date - : filter by dateearnerId - : filter by identity idList of GamificationActionsHistorypublic long findReputationByEarnerId(String earnerId)
earnerId - : the current user earner idpublic List<ProfileReputation> buildDomainScoreByIdentityId(String earnerId)
earnerId - earner identity idpublic void saveActionHistory(GamificationActionsHistory history)
history - history entru to savepublic void createHistory(String event, String sender, String receiver, String object)
public GamificationActionsHistory findLatestActionHistoryByEarnerId(String earnerId)
public List<StandardLeaderboard> filter(LeaderboardFilter filter)
filter - of type LeaderboardFilter, used to filter querypublic List<PiechartLeaderboard> buildStatsByUser(String earnerId, Date startDate, Date endDate)
earnerId - earner identity idstartDate - endDate - public long findUserReputationScoreBetweenDate(String earnerId, Date fromDate, Date toDate)
public long findUserReputationScoreByMonth(String earnerId, Date currentMonth)
public long findUserReputationScoreByDomainBetweenDate(String earnerId, String domain, Date fromDate, Date toDate)
public List<StandardLeaderboard> findAllLeaderboardBetweenDate(IdentityType earnedType, Date fromDate, Date toDate)
public List<GamificationActionsHistory> findActionsHistoryByEarnerId(String earnerId, int limit)
earnerId - earner identity Idlimit - limit entries to returnList of GamificationActionsHistorypublic GamificationActionsHistory build(RuleDTO ruleDto, String actor, String receiver, String objectId)
public long computeTotalScore(String actorIdentityId)
Copyright © 2003–2021 eXo Platform SAS. All rights reserved.