Class RewardPlugin
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.wallet.reward.api.RewardPlugin
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public abstract class RewardPlugin
extends org.exoplatform.container.component.BaseComponentPlugin
A reward plugin to manage rewarded points
-
Field Summary
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEarnedPoints(Set<Long> identityIds, long startDateInSeconds, long endDateInSeconds) Retrieves earned points for identities in a selected period of timeget reward plugin unique identifierbooleanChecks is the plugin is enabledMethods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Constructor Details
-
RewardPlugin
public RewardPlugin()
-
-
Method Details
-
getPluginId
get reward plugin unique identifier- Returns:
- reward plugin ID
-
isEnabled
public boolean isEnabled()Checks is the plugin is enabled- Returns:
- whether the plugin is enabled or not
-
getEarnedPoints
public abstract Map<Long,Double> getEarnedPoints(Set<Long> identityIds, long startDateInSeconds, long endDateInSeconds) Retrieves earned points for identities in a selected period of time- Parameters:
identityIds- identity ids of wallets to consider in computationstartDateInSeconds- start timestamp in seconds of reward periodendDateInSeconds- end timestamp in seconds of reward period- Returns:
- a
Mapof identity ID with the sum of tokens to send as reward
-