Class AuthenticatedTimerJobHandler

  • All Implemented Interfaces:
    org.activiti.engine.impl.jobexecutor.JobHandler

    public class AuthenticatedTimerJobHandler
    extends java.lang.Object
    implements org.activiti.engine.impl.jobexecutor.JobHandler
    An JobHandler which executes activiti timer-jobs authenticated against Alfresco. It runs the timer execution as the task's assignee (if any) when the timer is applied to a task. If not, system user is used to execute timer. It wraps another JobHandler to which the actual execution is delegated to.
    Since:
    3.4.e
    Author:
    Frederik Heremans
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthenticatedTimerJobHandler​(org.activiti.engine.impl.jobexecutor.JobHandler jobHandler, org.alfresco.service.cmr.repository.NodeService nodeService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(org.activiti.engine.impl.persistence.entity.JobEntity job, java.lang.String configuration, org.activiti.engine.impl.persistence.entity.ExecutionEntity execution, org.activiti.engine.impl.interceptor.CommandContext commandContext)  
      protected java.lang.String getInitiator​(ActivitiScriptNode initiatorNode)  
      java.lang.String getType()  
      • Methods inherited from class java.lang.Object

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

      • AuthenticatedTimerJobHandler

        public AuthenticatedTimerJobHandler​(org.activiti.engine.impl.jobexecutor.JobHandler jobHandler,
                                            org.alfresco.service.cmr.repository.NodeService nodeService)
        Parameters:
        jobHandler - the JobHandler to wrap.
        nodeService - the UNPROTECTED NodeService to use for fetching initiator username when only tenant is known. We can't use initiator ScriptNode for this, because this uses the protected NodeService which requires an authenticated user in that tenant (see getInitiator(ActivitiScriptNode)).
    • Method Detail

      • execute

        public void execute​(org.activiti.engine.impl.persistence.entity.JobEntity job,
                            java.lang.String configuration,
                            org.activiti.engine.impl.persistence.entity.ExecutionEntity execution,
                            org.activiti.engine.impl.interceptor.CommandContext commandContext)
        Specified by:
        execute in interface org.activiti.engine.impl.jobexecutor.JobHandler
      • getInitiator

        protected java.lang.String getInitiator​(ActivitiScriptNode initiatorNode)
      • getType

        public java.lang.String getType()
        Specified by:
        getType in interface org.activiti.engine.impl.jobexecutor.JobHandler