Class JobKeyFactory


  • public class JobKeyFactory
    extends Object
    Factory for creating a job key for formcycle specific jobs.
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • JobKeyFactory

        public JobKeyFactory()
    • Method Detail

      • extractWorkflowTriggerId

        public static long extractWorkflowTriggerId​(org.quartz.JobDetail job)
        Parameters:
        job - Job to process.
        Returns:
        The trigger ID in the job key, as created by getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
      • extractWorkflowTriggerId

        public static long extractWorkflowTriggerId​(org.quartz.JobKey jobKey)
        Parameters:
        jobKey - Job key to process.
        Returns:
        The trigger ID in the trigger key, as created by getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
      • extractWorkflowTriggerId

        public static long extractWorkflowTriggerId​(String jobName)
        Parameters:
        jobName - Job group to process.
        Returns:
        The process ID in the job name, as created by getWorkflowTriggerName(WorkflowTrigger).
      • extractWorkflowTriggerProcessDbId

        public static String extractWorkflowTriggerProcessDbId​(org.quartz.JobDetail job)
        Parameters:
        job - Job to process.
        Returns:
        The process database ID in the job key, as created by getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
      • extractWorkflowTriggerProcessDbId

        public static String extractWorkflowTriggerProcessDbId​(org.quartz.JobKey jobKey)
        Parameters:
        jobKey - Job key to process.
        Returns:
        The process database ID in the job key, as created by getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
      • extractWorkflowTriggerProcessDbId

        public static String extractWorkflowTriggerProcessDbId​(String jobGroup)
        Parameters:
        jobGroup - Job group to process.
        Returns:
        The process database ID in the job key, as created by getWorkflowTriggerGroup(String, String)
      • getClientCounterKey

        public static org.quartz.JobKey getClientCounterKey​(ClientCounter counter)
      • getPluginUpdateCheckKey

        public static org.quartz.JobKey getPluginUpdateCheckKey()
        Returns:
        JobKey for the plugin update check job
      • getProtocolCleanupKey

        public static org.quartz.JobKey getProtocolCleanupKey()
        Returns:
        JobKey for the protocol clean up job
      • getStatusChangeKey

        public static org.quartz.JobKey getStatusChangeKey​(Vorgang process)
        Parameters:
        process - Vorgang the process to create an job key
        Returns:
        JobKey for the given process
      • getSystemCleanupKey

        public static org.quartz.JobKey getSystemCleanupKey()
        Returns:
        The job key for the system cleanup job.
      • getRefreshTokenCleanupKey

        public static org.quartz.JobKey getRefreshTokenCleanupKey()
        Returns:
        The job key for the system cleanup job.
      • getWorkflowTriggerGroup

        @Deprecated
        public static String getWorkflowTriggerGroup​(String triggerType,
                                                     String processId)
        The group of the quartz job for a timed workflow trigger. It is of the following form:
         _WORKFLOW_TRIGGER_
         
        The constant WORKFLOW_TRIGGER is used as a separator so we can search for triggers both by type and by form record UUID.

        Example:

         WORKFLOW_TRIGGER_FC_STATE_TIMER_WORKFLOW_TRIGGER_9866b1fd-d288-4595-a37e-7e39efa059e3
         
        Parameters:
        triggerType - The type of the trigger for which to create the group.
        processId - Process ID of the form record for which to create the group.
        Returns:
        The quartz job group for the given form record and trigger type.
      • getWorkflowTriggerGroup

        public static String getWorkflowTriggerGroup​(WorkflowTrigger trigger,
                                                     Vorgang formRecord)
        The group of the quartz job for a timed workflow trigger. See getWorkflowTriggerGroup(String, String) for more details.
        Parameters:
        trigger - The trigger for which to create the group.
        formRecord - Form record for which to create the group.
        Returns:
        The quartz job group for the given form record and trigger type.
      • getWorkflowTriggerGroupByDbId

        public static String getWorkflowTriggerGroupByDbId​(String triggerType,
                                                           long formRecordId,
                                                           long projectId,
                                                           long clientId)
        The group of the quartz job for a timed workflow trigger. It is of the following form:
         _WORKFLOW_TRIGGER__pid#_cid#
         
        The constant WORKFLOW_TRIGGER is used as a separator so we can search for triggers by type, by form record ID, by project ID and by clientId.

        Example:

         FC_STATE_TIMER_WORKFLOW_TRIGGER_444_pid#333_cid#222
         
        Parameters:
        triggerType - The type of the trigger for which to create the group.
        formRecordId - Process ID of the form record for which to create the group.
        projectId - Project ID of the project from the form record for which to create the group.
        clientId - Client ID of the client from the form record for which to create the group.
        Returns:
        The quartz job group for the given form record ID, project ID, client ID and trigger type.
      • getWorkflowTriggerGroupByDbId

        public static String getWorkflowTriggerGroupByDbId​(String triggerType,
                                                           Vorgang formRecord)
        The group of the quartz job for a timed workflow trigger. See getWorkflowTriggerGroupByDbId(String, long, long, long) for more details.
        Parameters:
        triggerType - The type of the trigger for which to create the group.
        formRecord - Form record for which to create the group.
        Returns:
        The quartz job group for the given form record and trigger type.
      • getWorkflowTriggerGroupByDbId

        public static String getWorkflowTriggerGroupByDbId​(WorkflowTrigger trigger,
                                                           long formRecordId,
                                                           long projectId,
                                                           long clientId)
        The group of the quartz job for a timed workflow trigger. See getWorkflowTriggerGroupByDbId(String, long, long, long) for more details.
        Parameters:
        trigger - The trigger for which to create the group.
        formRecordId - The process ID of the form record for which to create the group.
        projectId - Project ID of the project from the form record for which to create the group.
        clientId - Client ID of the client from the form record for which to create the group.
        Returns:
        The quartz job group for the given form record ID, project ID, client ID and trigger type.
      • getWorkflowTriggerGroupByDbId

        public static String getWorkflowTriggerGroupByDbId​(WorkflowTrigger trigger,
                                                           Vorgang formRecord)
        The group of the quartz job for a timed workflow trigger. See getWorkflowTriggerGroupByDbId(String, long, long, long) for more details.
        Parameters:
        trigger - The trigger for which to create the group.
        formRecord - Form record for which to create the group.
        Returns:
        The quartz job group for the given form record and trigger type.
      • getWorkflowTriggerGroupMatcherForFormRecord

        @Deprecated
        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> getWorkflowTriggerGroupMatcherForFormRecord​(String processId)
        Parameters:
        processId - Process ID of a form record for which to find jobs.
        Returns:
        A group matcher for all Jobs that were created for the given form record, irrespective of their trigger type.
      • getWorkflowTriggerGroupMatcherForFormRecord

        @Deprecated
        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> getWorkflowTriggerGroupMatcherForFormRecord​(Vorgang formRecord)
        Parameters:
        formRecord - A form record for which to find jobs.
        Returns:
        A group matcher for all Jobs that were created for the given form record, irrespective of their trigger type.
      • getWorkflowTriggerGroupMatcherForFormRecordByDbId

        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> getWorkflowTriggerGroupMatcherForFormRecordByDbId​(long formRecordId)
        Parameters:
        formRecordId - Form record ID of a form record for which to find jobs.
        Returns:
        A group matcher for all Jobs that were created for the given form record, irrespective of their trigger type.
      • getWorkflowTriggerGroupMatcherForFormRecordByDbId

        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> getWorkflowTriggerGroupMatcherForFormRecordByDbId​(Vorgang formRecord)
        Parameters:
        formRecord - A form record for which to find jobs.
        Returns:
        A group matcher for all Jobs that were created for the given form record, irrespective of their trigger type.
      • getWorkflowTriggerGroupMatcherByProjectId

        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> getWorkflowTriggerGroupMatcherByProjectId​(long projectId)
        Parameters:
        projectId - The project ID to find quartz triggers.
        Returns:
        A group matcher for all Jobs of workflow triggers that are scheduled for the given project ID, irrespective of their type.
      • getWorkflowTriggerGroupMatcherByClientId

        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> getWorkflowTriggerGroupMatcherByClientId​(long clientId)
        Parameters:
        clientId - The client ID to find quartz triggers.
        Returns:
        A group matcher for all Jobs of workflow triggers that are scheduled for the given client ID, irrespective of their type.
      • getWorkflowTriggerGroupMatcherForTrigger

        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> getWorkflowTriggerGroupMatcherForTrigger​(String triggerType)
        Parameters:
        triggerType - Type of a workflow trigger for which to find jobs.
        Returns:
        A group matcher for all Jobs that belong to the getWorkflowTriggerGroup(String, Vorgang) for a given trigger type, irrespective of the Vorgang.
      • getWorkflowTriggerGroupMatcherForTrigger

        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> getWorkflowTriggerGroupMatcherForTrigger​(WorkflowTrigger trigger)
        Parameters:
        trigger - A workflow trigger for which to find jobs.
        Returns:
        A group matcher for all Jobs that belong to the getWorkflowTriggerGroup(String, Vorgang) for a given trigger type, irrespective of the Vorgang.
      • getWorkflowTriggerKeyByDbId

        public static org.quartz.JobKey getWorkflowTriggerKeyByDbId​(WorkflowTrigger trigger,
                                                                    Vorgang formRecord)
        Parameters:
        trigger - The workflow trigger for which to create a key.
        formRecord - The form record for which to create a key.
        Returns:
        A TriggerKey for the trigger within the given form record.
      • getWorkflowTriggerName

        public static String getWorkflowTriggerName​(WorkflowTrigger trigger)
        Parameters:
        trigger - Trigger for which to retrieve the name.
        Returns:
        The job name for the given workflow trigger.