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
FieldsModifier and TypeFieldDescriptionprotected org.exoplatform.addons.gamification.service.effective.GamificationServiceprotected org.exoplatform.social.core.manager.IdentityManagerprotected org.exoplatform.addons.gamification.service.configuration.RuleServiceFields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
ConstructorsConstructorDescriptionGamificationTaskUpdateListener(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 TypeMethodDescriptionprotected voidcreateTask(org.exoplatform.task.dto.TaskDto task) protected booleanCheck whether a task has been updatedvoidonEvent(org.exoplatform.services.listener.Event<org.exoplatform.task.service.TaskService, org.exoplatform.task.service.TaskPayload> event) protected voidupdateTask(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
-
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:
onEventin classorg.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
Check whether a task has been updated- Parameters:
before- : Task data before modificationafter- : Task data after modification- Returns:
- a boolean if task has been changed false else
-