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)
      • extractWorkflowTriggerProcessId

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

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

        public static String extractWorkflowTriggerProcessId​(org.quartz.TriggerKey triggerKey)
        Parameters:
        triggerKey - Trigger key to process.
        Returns:
        The process 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)
      • 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​(Vorgang process)
        Parameters:
        process - Vorgang the process to get an trigger key for
        Returns:
        TriggerKey for the process
      • 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
      • getClientCounterTrigger

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

        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.
      • getWorkflowTriggerGroup

        public static String getWorkflowTriggerGroup​(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.
      • getWorkflowTriggerGroup

        public static String getWorkflowTriggerGroup​(WorkflowTrigger trigger,
                                                     String processId)
        The group of the quartz trigger for a timed state workflow trigger. See getWorkflowTriggerGroup(String, String) for more details.
        Parameters:
        processId - Process ID of the 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.
      • getWorkflowTriggerGroup

        public static String getWorkflowTriggerGroup​(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

        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

        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.
      • 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.