Class GamificationTaskUpdateListener

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.listener.Listener<org.exoplatform.task.service.TaskService,org.exoplatform.task.service.TaskPayload>
org.exoplatform.task.integration.gamification.GamificationTaskUpdateListener
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class GamificationTaskUpdateListener extends org.exoplatform.services.listener.Listener<org.exoplatform.task.service.TaskService,org.exoplatform.task.service.TaskPayload>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.exoplatform.addons.gamification.service.effective.GamificationService
     
    protected org.exoplatform.social.core.manager.IdentityManager
     
    protected org.exoplatform.addons.gamification.service.configuration.RuleService
     

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

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
    GamificationTaskUpdateListener(org.exoplatform.addons.gamification.service.configuration.RuleService ruleService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.addons.gamification.service.effective.GamificationService gamificationService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    createTask(org.exoplatform.task.dto.TaskDto task)
     
    protected boolean
    isDiff(Object before, Object after)
    Check whether a task has been updated
    void
    onEvent(org.exoplatform.services.listener.Event<org.exoplatform.task.service.TaskService,org.exoplatform.task.service.TaskPayload> event)
     
    protected void
    updateTask(org.exoplatform.task.dto.TaskDto before, org.exoplatform.task.dto.TaskDto after)
     

    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
  • Field Details

    • ruleService

      protected org.exoplatform.addons.gamification.service.configuration.RuleService ruleService
    • identityManager

      protected org.exoplatform.social.core.manager.IdentityManager identityManager
    • gamificationService

      protected org.exoplatform.addons.gamification.service.effective.GamificationService gamificationService
  • Constructor Details

    • GamificationTaskUpdateListener

      public GamificationTaskUpdateListener(org.exoplatform.addons.gamification.service.configuration.RuleService ruleService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.addons.gamification.service.effective.GamificationService gamificationService)
  • Method Details

    • onEvent

      public void onEvent(org.exoplatform.services.listener.Event<org.exoplatform.task.service.TaskService,org.exoplatform.task.service.TaskPayload> event) throws Exception
      Specified by:
      onEvent in class org.exoplatform.services.listener.Listener<org.exoplatform.task.service.TaskService,org.exoplatform.task.service.TaskPayload>
      Throws:
      Exception
    • createTask

      protected void createTask(org.exoplatform.task.dto.TaskDto task)
    • updateTask

      protected void updateTask(org.exoplatform.task.dto.TaskDto before, org.exoplatform.task.dto.TaskDto after)
    • isDiff

      protected boolean isDiff(Object before, Object after)
      Check whether a task has been updated
      Parameters:
      before - : Task data before modification
      after - : Task data after modification
      Returns:
      a boolean if task has been changed false else