Class TriggerKeyFactory


  • public class TriggerKeyFactory
    extends Object
    Factory for creating a trigger key for formcycle specific triggers.
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • TriggerKeyFactory

        public TriggerKeyFactory()
    • Method Detail

      • extractWorkflowTriggerId

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

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

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

        public static String extractWorkflowTriggerType​(String triggerGroup)
        Parameters:
        triggerGroup - Trigger group to process.
        Returns:
        The trigger type in the trigger group, as created by getWorkflowTriggerGroup(String, String).
      • extractWorkflowTriggerType

        public static String extractWorkflowTriggerType​(org.quartz.TriggerKey triggerKey)
        Parameters:
        triggerKey - Trigger key to process.
        Returns:
        The trigger type in the trigger key, as created by getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
      • getClientCounterTrigger

        public static org.quartz.TriggerKey getClientCounterTrigger​(ClientCounter counter)
      • getPluginUpdateCheckTrigger

        public static org.quartz.TriggerKey getPluginUpdateCheckTrigger​(TriggerKeyFactory.ETriggerGroups triggerGroup)
        Parameters:
        triggerGroup - Group to set for the trigger.
        Returns:
        The trigger key for the plugin update check job.
      • getProtocolCleanupTrigger

        public static org.quartz.TriggerKey getProtocolCleanupTrigger​(TriggerKeyFactory.ETriggerGroups triggerGroup)
        Parameters:
        triggerGroup - Group to set for the trigger.
        Returns:
        The trigger key for the protocol cleanup job.
      • getSystemCleanupTrigger

        public static org.quartz.TriggerKey getSystemCleanupTrigger​(TriggerKeyFactory.ETriggerGroups triggerGroup)
        Parameters:
        triggerGroup - Group to set for the trigger.
        Returns:
        The trigger key for the system cleanup job.
      • getVorgangTrigger

        public static org.quartz.TriggerKey getVorgangTrigger​(String prozessId)
        Parameters:
        prozessId - String the process ID to get a trigger key for
        Returns:
        TriggerKey for the process
      • getVorgangTrigger

        public static org.quartz.TriggerKey getVorgangTrigger​(Vorgang process)
        Parameters:
        process - Vorgang the process to get an trigger key for
        Returns:
        TriggerKey for the process
      • getWorkflowTriggerGroup

        @Deprecated
        public static String getWorkflowTriggerGroup​(String triggerType,
                                                     String processId)
        The group of the quartz trigger for a timed state 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:
        processId - Process ID of the form record for which to create the group.
        triggerType - The type of the trigger for which to create the group.
        Returns:
        The quartz trigger group for the given form record and trigger type.
      • getWorkflowTriggerGroupByDbId

        public static String getWorkflowTriggerGroupByDbId​(String triggerType,
                                                           long processId,
                                                           long projectId,
                                                           long clientId)
        The group of the quartz trigger for a timed state 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 both by type and by form record UUID.

        Example:

         FC_STATE_TIMER_WORKFLOW_TRIGGER_444_pid#333_cid#222
         
        Parameters:
        processId - Process ID of the form record for which to create the group.
        triggerType - The type of the trigger 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 trigger for a timed state workflow trigger. See getWorkflowTriggerGroup(String, String) for more details.
        Parameters:
        formRecord - Form record for which to create the group.
        triggerType - Type of the trigger for which to create the group.
        Returns:
        The quartz trigger group for the given form record and trigger type.
      • getWorkflowTriggerGroupByDbId

        public static String getWorkflowTriggerGroupByDbId​(WorkflowTrigger trigger,
                                                           long processId,
                                                           long projectId,
                                                           long clientId)
        The group of the quartz trigger for a timed state workflow trigger. See getWorkflowTriggerGroup(String, String) for more details.
        Parameters:
        trigger - Trigger for which to create the group.
        processId - 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 trigger group for the given form record and trigger type.
      • getWorkflowTriggerGroupByDbId

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

        @Deprecated
        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> getWorkflowTriggerGroupMatcherForForRecord​(String processId)
        Parameters:
        processId - The process ID of a form record for which to find quartz triggers.
        Returns:
        A group matcher for all Triggers of workflow triggers that are scheduled for the given form record, irrespective of their type.
      • getWorkflowTriggerGroupMatcherForForRecord

        @Deprecated
        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> getWorkflowTriggerGroupMatcherForForRecord​(Vorgang formRecord)
        Parameters:
        formRecord - A form record for which to find quartz triggers.
        Returns:
        A group matcher for all Triggers of workflow triggers that are scheduled for the given form record, irrespective of their type.
      • getWorkflowTriggerGroupMatcherForRecordByDbId

        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> getWorkflowTriggerGroupMatcherForRecordByDbId​(long processId)
        Parameters:
        processId - The process ID of a form record for which to find quartz triggers.
        Returns:
        A group matcher for all Triggers of workflow triggers that are scheduled for the given form record, irrespective of their type.
      • getWorkflowTriggerGroupMatcherForRecordByProjectId

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

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

        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> getWorkflowTriggerGroupMatcherForRecordByDbId​(Vorgang formRecord)
        Parameters:
        formRecord - A form record for which to find quartz triggers.
        Returns:
        A group matcher for all Triggers of workflow triggers that are scheduled for the given form record, irrespective of their type.
      • getWorkflowTriggerGroupMatcherForTrigger

        public static org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> getWorkflowTriggerGroupMatcherForTrigger​(String triggerType)
        Parameters:
        triggerType - Type of the workflow trigger for which to find quartz triggers.
        Returns:
        A group matcher for all Triggers 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.TriggerKey> getWorkflowTriggerGroupMatcherForTrigger​(WorkflowTrigger trigger)
        Parameters:
        trigger - Workflow trigger for which to find quartz triggers.
        Returns:
        A group matcher for all Triggers that belong to the getWorkflowTriggerGroup(String, Vorgang) for a given trigger type, irrespective of the Vorgang.
      • getWorkflowTriggerName

        public static String getWorkflowTriggerName​(WorkflowTrigger trigger)
        The name of the quartz trigger for a timed state workflow trigger. It is of the following form:
         
         
        Example: 552
        Parameters:
        trigger - Workflow trigger for which to the quartz trigger name.
        Returns:
        The quartz trigger name for the given workflow trigger.