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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Map<Long,Double>
    getEarnedPoints(Set<Long> identityIds, long startDateInSeconds, long endDateInSeconds)
    Retrieves earned points for identities in a selected period of time
    get reward plugin unique identifier
    boolean
    Checks is the plugin is enabled

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RewardPlugin

      public RewardPlugin()
  • Method Details

    • 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