|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.DefaultPriorityProvider<T>
T - the type of the param to determine the prioritypublic abstract class DefaultPriorityProvider<T>
Represents a default priority provider, which contains some functionality to evaluate the priority. Can be used as base class for other priority providers. *
| Field Summary | |
|---|---|
static long |
DEFAULT_PRIORITY
The default priority. |
static long |
DEFAULT_PRIORITY_ON_RESOLUTION_FAILURE
The default priority in case of resolution failure. |
| Constructor Summary | |
|---|---|
DefaultPriorityProvider()
|
|
| Method Summary | |
|---|---|
long |
determinePriority(ExecutionEntity execution,
T param,
String jobDefinitionId)
|
protected Long |
evaluateValueProvider(ParameterValueProvider valueProvider,
ExecutionEntity execution,
String errorMessageHeading)
Evaluates a given value provider with the given execution entity to determine the correct value. |
long |
getDefaultPriority()
Returns the default priority. |
long |
getDefaultPriorityOnResolutionFailure()
Returns the default priority in case of resolution failure. |
protected Long |
getProcessDefinedPriority(ProcessDefinitionImpl processDefinition,
String propertyKey,
ExecutionEntity execution,
String errorMsgHead)
Returns the priority which is defined in the given process definition. |
protected abstract Long |
getProcessDefinitionPriority(ExecutionEntity execution,
T param)
Returns the priority defined in the process definition. |
protected abstract Long |
getSpecificPriority(ExecutionEntity execution,
T param,
String jobDefinitionId)
Returns the priority defined in the specific entity. |
protected boolean |
isSymptomOfContextSwitchFailure(Throwable t,
ExecutionEntity contextExecution)
|
protected boolean |
isValidLongValue(Number value)
Checks if the given number is a valid long value. |
protected abstract void |
logNotDeterminingPriority(ExecutionEntity execution,
Object value,
ProcessEngineException e)
Logs the exception which was thrown if the priority can not be determined. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static long DEFAULT_PRIORITY
public static long DEFAULT_PRIORITY_ON_RESOLUTION_FAILURE
| Constructor Detail |
|---|
public DefaultPriorityProvider()
| Method Detail |
|---|
public long getDefaultPriority()
public long getDefaultPriorityOnResolutionFailure()
protected Long evaluateValueProvider(ParameterValueProvider valueProvider,
ExecutionEntity execution,
String errorMessageHeading)
valueProvider - the provider which contains the valueexecution - the execution entityerrorMessageHeading - the heading which is used for the error message
public long determinePriority(ExecutionEntity execution,
T param,
String jobDefinitionId)
determinePriority in interface PriorityProvider<T>execution - may be null when the job is not created in the context of a
running process instance (e.g. a timer start event)param - extra parameter to determine priority onjobDefinitionId - the job definition id if related to a job
protected abstract Long getSpecificPriority(ExecutionEntity execution,
T param,
String jobDefinitionId)
execution - the current executionparam - the generic paramjobDefinitionId - the job definition id if related to a job
protected abstract Long getProcessDefinitionPriority(ExecutionEntity execution,
T param)
execution - the current executionparam - the generic param
protected Long getProcessDefinedPriority(ProcessDefinitionImpl processDefinition,
String propertyKey,
ExecutionEntity execution,
String errorMsgHead)
processDefinition - the process definition that should contains the prioritypropertyKey - the key which identifies the propertyexecution - the current executionerrorMsgHead - the error message header which is used if the evaluation fails
protected abstract void logNotDeterminingPriority(ExecutionEntity execution,
Object value,
ProcessEngineException e)
execution - the current execution entityvalue - the current valuee - the exception which was catched
protected boolean isSymptomOfContextSwitchFailure(Throwable t,
ExecutionEntity contextExecution)
protected boolean isValidLongValue(Number value)
value - the number which should be checked
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||