Package de.xima.fc.timing
Class TriggerKeyFactory
- java.lang.Object
-
- de.xima.fc.timing.TriggerKeyFactory
-
public class TriggerKeyFactory extends Object
Factory for creating a trigger key for FORMCYCLE specific triggers.- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TriggerKeyFactory.ETriggerGroups
Enumeration of the predefined for trigger groups
-
Constructor Summary
Constructors Constructor Description TriggerKeyFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
extractWorkflowTriggerId(String triggerName)
static long
extractWorkflowTriggerId(org.quartz.Trigger trigger)
static long
extractWorkflowTriggerId(org.quartz.TriggerKey triggerKey)
static String
extractWorkflowTriggerProcessId(String triggerGroup)
static String
extractWorkflowTriggerProcessId(org.quartz.Trigger trigger)
static String
extractWorkflowTriggerProcessId(org.quartz.TriggerKey triggerKey)
static String
extractWorkflowTriggerType(String triggerGroup)
static String
extractWorkflowTriggerType(org.quartz.Trigger trigger)
static String
extractWorkflowTriggerType(org.quartz.TriggerKey triggerKey)
static org.quartz.TriggerKey
getClientCounterTrigger(ClientCounter counter)
static org.quartz.TriggerKey
getProtocolCleanupTrigger(TriggerKeyFactory.ETriggerGroups triggerGroup)
static org.quartz.TriggerKey
getSystemCleanupTrigger(TriggerKeyFactory.ETriggerGroups triggerGroup)
static org.quartz.TriggerKey
getVorgangTrigger(Vorgang process)
static org.quartz.TriggerKey
getVorgangTrigger(String prozessId)
static String
getWorkflowTriggerGroup(WorkflowTrigger trigger, Vorgang formRecord)
The group of the quartz trigger for a timed state workflow trigger.static String
getWorkflowTriggerGroup(WorkflowTrigger trigger, String processId)
The group of the quartz trigger for a timed state workflow trigger.static String
getWorkflowTriggerGroup(String triggerType, Vorgang formRecord)
The group of the quartz trigger for a timed state workflow trigger.static String
getWorkflowTriggerGroup(String triggerType, String processId)
The group of the quartz trigger for a timed state workflow trigger.static org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey>
getWorkflowTriggerGroupMatcherForForRecord(Vorgang formRecord)
static org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey>
getWorkflowTriggerGroupMatcherForForRecord(String processId)
static org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey>
getWorkflowTriggerGroupMatcherForTrigger(WorkflowTrigger trigger)
static org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey>
getWorkflowTriggerGroupMatcherForTrigger(String triggerType)
static org.quartz.TriggerKey
getWorkflowTriggerKey(WorkflowTrigger trigger, Vorgang formRecord)
Creates the job key for a timed state trigger, seegetWorkflowTriggerName(WorkflowTrigger)
andgetWorkflowTriggerGroup(String, Vorgang)
.static String
getWorkflowTriggerName(WorkflowTrigger trigger)
The name of the quartz trigger for a timed state workflow trigger.
-
-
-
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.Trigger trigger)
- Parameters:
trigger
- Trigger to process.- Returns:
- The trigger type in the trigger key, as created by
getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
-
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_ 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. SeegetWorkflowTriggerGroup(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. SeegetWorkflowTriggerGroup(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. SeegetWorkflowTriggerGroup(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
Trigger
s 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
Trigger
s 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
Trigger
s that belong to thegetWorkflowTriggerGroup(String, Vorgang)
for a given trigger type, irrespective of theVorgang
.
-
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
Trigger
s that belong to thegetWorkflowTriggerGroup(String, Vorgang)
for a given trigger type, irrespective of theVorgang
.
-
getWorkflowTriggerKey
public static org.quartz.TriggerKey getWorkflowTriggerKey(WorkflowTrigger trigger, Vorgang formRecord)
Creates the job key for a timed state trigger, seegetWorkflowTriggerName(WorkflowTrigger)
andgetWorkflowTriggerGroup(String, Vorgang)
.- 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)
The name of the quartz trigger for a timed state workflow trigger. It is of the following form:552
- Parameters:
trigger
- Workflow trigger for which to the quartz trigger name.- Returns:
- The quartz trigger name for the given workflow trigger.
-
-