Class EventPlugin

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
io.meeds.gamification.plugin.EventPlugin
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
Direct Known Subclasses:
ContributionEventPlugin, StreamEventPlugin

public abstract class EventPlugin extends org.exoplatform.container.component.BaseComponentPlugin
A plugin that will be used by EventService to check event by its properties
  • 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 String
     
    double
    getPointsRatio(Map<String,String> eventProperties, String triggerDetails)
    get points ration using event properties and properties coming from an external trigger
    abstract List<String>
     
    abstract boolean
    isValidEvent(Map<String,String> eventProperties, String triggerDetails)
    Check if event properties match properties coming from an external trigger

    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

    • EventPlugin

      public EventPlugin()
  • Method Details

    • getEventType

      public abstract String getEventType()
      Returns:
      event types that plugin handles
    • getTriggers

      public abstract List<String> getTriggers()
      Returns:
      List of available triggers
    • isValidEvent

      public abstract boolean isValidEvent(Map<String,String> eventProperties, String triggerDetails)
      Check if event properties match properties coming from an external trigger
    • getPointsRatio

      public double getPointsRatio(Map<String,String> eventProperties, String triggerDetails)
      get points ration using event properties and properties coming from an external trigger
      Returns:
      the get points ratio for realization