Package de.xima.fc.timing
Class JobKeyFactory
- java.lang.Object
-
- de.xima.fc.timing.JobKeyFactory
-
public class JobKeyFactory extends Object
Factory for creating a job key for FORMCYCLE specific jobs.- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JobKeyFactory.JobGroups
Enumeration of the predefined job groups
-
Constructor Summary
Constructors Constructor Description JobKeyFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
extractWorkflowTriggerId(String jobName)
static long
extractWorkflowTriggerId(org.quartz.JobDetail job)
static long
extractWorkflowTriggerId(org.quartz.JobKey jobKey)
static String
extractWorkflowTriggerProcessId(String jobGroup)
static String
extractWorkflowTriggerProcessId(org.quartz.JobDetail job)
static String
extractWorkflowTriggerProcessId(org.quartz.JobKey jobKey)
static String
extractWorkflowTriggerType(String jobGroup)
static String
extractWorkflowTriggerType(org.quartz.JobDetail job)
static String
extractWorkflowTriggerType(org.quartz.JobKey jobKey)
static org.quartz.JobKey
getClientCounterKey(ClientCounter counter)
static org.quartz.JobKey
getProtocolCleanupKey()
static org.quartz.JobKey
getStatusChangeKey(Vorgang process)
static org.quartz.JobKey
getSystemCleanupKey()
static String
getWorkflowTriggerGroup(WorkflowTrigger trigger, Vorgang formRecord)
The group of the quartz job for a timed workflow trigger.static String
getWorkflowTriggerGroup(WorkflowTrigger trigger, String processId)
The group of the quartz job for a timed workflow trigger.static String
getWorkflowTriggerGroup(String triggerType, Vorgang formRecord)
The group of the quartz job for a timed workflow trigger.static String
getWorkflowTriggerGroup(String triggerType, String processId)
The group of the quartz job for a timed workflow trigger.static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey>
getWorkflowTriggerGroupMatcherForFormRecord(Vorgang formRecord)
static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey>
getWorkflowTriggerGroupMatcherForFormRecord(String processId)
static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey>
getWorkflowTriggerGroupMatcherForTrigger(WorkflowTrigger trigger)
static org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey>
getWorkflowTriggerGroupMatcherForTrigger(String triggerType)
static org.quartz.JobKey
getWorkflowTriggerKey(WorkflowTrigger trigger, Vorgang formRecord)
static String
getWorkflowTriggerName(WorkflowTrigger trigger)
-
-
-
Method Detail
-
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)
.
-
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)
-
extractWorkflowTriggerProcessId
public static String extractWorkflowTriggerProcessId(org.quartz.JobDetail job)
- Parameters:
job
- Job to process.- Returns:
- The process ID in the job key, as created by
getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
-
extractWorkflowTriggerProcessId
public static String extractWorkflowTriggerProcessId(org.quartz.JobKey jobKey)
- Parameters:
jobKey
- Job key to process.- Returns:
- The process ID in the job key, as created by
getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
-
extractWorkflowTriggerProcessId
public static String extractWorkflowTriggerProcessId(String jobGroup)
- Parameters:
jobGroup
- Job group to process.- Returns:
- The process ID in the job key, as created by
getWorkflowTriggerGroup(String, String)
-
extractWorkflowTriggerType
public static String extractWorkflowTriggerType(org.quartz.JobDetail job)
- Parameters:
job
- Job to process.- Returns:
- The trigger type in the job key, as created by
getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
.
-
extractWorkflowTriggerType
public static String extractWorkflowTriggerType(org.quartz.JobKey jobKey)
- Parameters:
jobKey
- Job key to process.- Returns:
- The trigger type in the job key, as created by
getWorkflowTriggerKey(WorkflowTrigger, Vorgang)
.
-
extractWorkflowTriggerType
public static String extractWorkflowTriggerType(String jobGroup)
- Parameters:
jobGroup
- Job group to process.- Returns:
- The trigger type in the job key, as created by
getWorkflowTriggerGroup(String, String)
-
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.
-
getClientCounterKey
public static org.quartz.JobKey getClientCounterKey(ClientCounter counter)
-
getWorkflowTriggerGroup
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_ 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(String triggerType, Vorgang formRecord)
The group of the quartz job for a timed workflow trigger. SeegetWorkflowTriggerGroup(String, String)
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.
-
getWorkflowTriggerGroup
public static String getWorkflowTriggerGroup(WorkflowTrigger trigger, String processId)
The group of the quartz job for a timed workflow trigger. SeegetWorkflowTriggerGroup(String, String)
for more details.- Parameters:
trigger
- The trigger for which to create the group.processId
- The 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. SeegetWorkflowTriggerGroup(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.
-
getWorkflowTriggerGroupMatcherForFormRecord
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
Job
s that were created for the given form record, irrespective of their trigger type.
-
getWorkflowTriggerGroupMatcherForFormRecord
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
Job
s that were created for the given form record, irrespective of their trigger 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
Job
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.JobKey> getWorkflowTriggerGroupMatcherForTrigger(WorkflowTrigger trigger)
- Parameters:
trigger
- A workflow trigger for which to find jobs.- Returns:
- A group matcher for all
Job
s that belong to thegetWorkflowTriggerGroup(String, Vorgang)
for a given trigger type, irrespective of theVorgang
.
-
getWorkflowTriggerKey
public static org.quartz.JobKey getWorkflowTriggerKey(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.
-
-