Class 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
    • Constructor Detail

      • RewardPlugin

        public RewardPlugin()
    • Method Detail

      • getPluginId

        public String 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 computation
        startDateInSeconds - start timestamp in seconds of reward period
        endDateInSeconds - end timestamp in seconds of reward period
        Returns:
        a Map of identity ID with the sum of tokens to send as reward