Class UpdateJobDefinitionSuspensionStateBuilderImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.management.UpdateJobDefinitionSuspensionStateBuilderImpl
-
- All Implemented Interfaces:
UpdateJobDefinitionSuspensionStateBuilder
,UpdateJobDefinitionSuspensionStateSelectBuilder
,UpdateJobDefinitionSuspensionStateTenantBuilder
public class UpdateJobDefinitionSuspensionStateBuilderImpl extends java.lang.Object implements UpdateJobDefinitionSuspensionStateBuilder, UpdateJobDefinitionSuspensionStateSelectBuilder, UpdateJobDefinitionSuspensionStateTenantBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutor
commandExecutor
protected java.util.Date
executionDate
protected boolean
includeJobs
protected boolean
isProcessDefinitionTenantIdSet
protected java.lang.String
jobDefinitionId
protected java.lang.String
processDefinitionId
protected java.lang.String
processDefinitionKey
protected java.lang.String
processDefinitionTenantId
-
Constructor Summary
Constructors Constructor Description UpdateJobDefinitionSuspensionStateBuilderImpl()
Creates a builder without CommandExecutor which can not be used to update the suspension state viaactivate()
orsuspend()
.UpdateJobDefinitionSuspensionStateBuilderImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
Activates the provided job definitions.UpdateJobDefinitionSuspensionStateBuilderImpl
byJobDefinitionId(java.lang.String jobDefinitionId)
Selects the job definition with the given id.UpdateJobDefinitionSuspensionStateBuilderImpl
byProcessDefinitionId(java.lang.String processDefinitionId)
Selects the job definitions of the process definition with the given id.UpdateJobDefinitionSuspensionStateBuilderImpl
byProcessDefinitionKey(java.lang.String processDefinitionKey)
Selects the job definitions of the process definitions with the given key.UpdateJobDefinitionSuspensionStateBuilderImpl
executionDate(java.util.Date executionDate)
Specify when the suspension state should be updated.java.util.Date
getExecutionDate()
java.lang.String
getJobDefinitionId()
java.lang.String
getProcessDefinitionId()
java.lang.String
getProcessDefinitionKey()
java.lang.String
getProcessDefinitionTenantId()
UpdateJobDefinitionSuspensionStateBuilderImpl
includeJobs(boolean includeJobs)
Specify if the suspension states of the jobs of the provided job definitions should also be updated.boolean
isIncludeJobs()
boolean
isProcessDefinitionTenantIdSet()
UpdateJobDefinitionSuspensionStateBuilderImpl
processDefinitionTenantId(java.lang.String tenantId)
Specify the id of the tenant the process definition belongs to.UpdateJobDefinitionSuspensionStateBuilderImpl
processDefinitionWithoutTenantId()
Specify that the process definition belongs to no tenant.void
suspend()
Suspends the provided job definitions.protected void
validateParameters()
-
-
-
Field Detail
-
commandExecutor
protected final CommandExecutor commandExecutor
-
jobDefinitionId
protected java.lang.String jobDefinitionId
-
processDefinitionKey
protected java.lang.String processDefinitionKey
-
processDefinitionId
protected java.lang.String processDefinitionId
-
processDefinitionTenantId
protected java.lang.String processDefinitionTenantId
-
isProcessDefinitionTenantIdSet
protected boolean isProcessDefinitionTenantIdSet
-
includeJobs
protected boolean includeJobs
-
executionDate
protected java.util.Date executionDate
-
-
Constructor Detail
-
UpdateJobDefinitionSuspensionStateBuilderImpl
public UpdateJobDefinitionSuspensionStateBuilderImpl(CommandExecutor commandExecutor)
-
UpdateJobDefinitionSuspensionStateBuilderImpl
public UpdateJobDefinitionSuspensionStateBuilderImpl()
Creates a builder without CommandExecutor which can not be used to update the suspension state viaactivate()
orsuspend()
. Can only be used in combination with your own command.
-
-
Method Detail
-
byJobDefinitionId
public UpdateJobDefinitionSuspensionStateBuilderImpl byJobDefinitionId(java.lang.String jobDefinitionId)
Description copied from interface:UpdateJobDefinitionSuspensionStateSelectBuilder
Selects the job definition with the given id.- Specified by:
byJobDefinitionId
in interfaceUpdateJobDefinitionSuspensionStateSelectBuilder
- Parameters:
jobDefinitionId
- id of the job definition- Returns:
- the builder
-
byProcessDefinitionId
public UpdateJobDefinitionSuspensionStateBuilderImpl byProcessDefinitionId(java.lang.String processDefinitionId)
Description copied from interface:UpdateJobDefinitionSuspensionStateSelectBuilder
Selects the job definitions of the process definition with the given id.- Specified by:
byProcessDefinitionId
in interfaceUpdateJobDefinitionSuspensionStateSelectBuilder
- Parameters:
processDefinitionId
- id of the process definition- Returns:
- the builder
-
byProcessDefinitionKey
public UpdateJobDefinitionSuspensionStateBuilderImpl byProcessDefinitionKey(java.lang.String processDefinitionKey)
Description copied from interface:UpdateJobDefinitionSuspensionStateSelectBuilder
Selects the job definitions of the process definitions with the given key.- Specified by:
byProcessDefinitionKey
in interfaceUpdateJobDefinitionSuspensionStateSelectBuilder
- Parameters:
processDefinitionKey
- key of the process definition- Returns:
- the builder
-
processDefinitionWithoutTenantId
public UpdateJobDefinitionSuspensionStateBuilderImpl processDefinitionWithoutTenantId()
Description copied from interface:UpdateJobDefinitionSuspensionStateTenantBuilder
Specify that the process definition belongs to no tenant.- Specified by:
processDefinitionWithoutTenantId
in interfaceUpdateJobDefinitionSuspensionStateTenantBuilder
- Returns:
- the builder
-
processDefinitionTenantId
public UpdateJobDefinitionSuspensionStateBuilderImpl processDefinitionTenantId(java.lang.String tenantId)
Description copied from interface:UpdateJobDefinitionSuspensionStateTenantBuilder
Specify the id of the tenant the process definition belongs to.- Specified by:
processDefinitionTenantId
in interfaceUpdateJobDefinitionSuspensionStateTenantBuilder
- Parameters:
tenantId
- the id of the tenant- Returns:
- the builder
-
includeJobs
public UpdateJobDefinitionSuspensionStateBuilderImpl includeJobs(boolean includeJobs)
Description copied from interface:UpdateJobDefinitionSuspensionStateBuilder
Specify if the suspension states of the jobs of the provided job definitions should also be updated. Default isfalse
.- Specified by:
includeJobs
in interfaceUpdateJobDefinitionSuspensionStateBuilder
- Parameters:
includeJobs
- iftrue
, all related jobs will be activated / suspended too.- Returns:
- the builder
-
executionDate
public UpdateJobDefinitionSuspensionStateBuilderImpl executionDate(java.util.Date executionDate)
Description copied from interface:UpdateJobDefinitionSuspensionStateBuilder
Specify when the suspension state should be updated. Note that the job executor needs to be active to use this.- Specified by:
executionDate
in interfaceUpdateJobDefinitionSuspensionStateBuilder
- Parameters:
executionDate
- the date on which the job definition will be activated / suspended. Ifnull
, the job definition is activated / suspended immediately.- Returns:
- the builder
-
activate
public void activate()
Description copied from interface:UpdateJobDefinitionSuspensionStateBuilder
Activates the provided job definitions.- Specified by:
activate
in interfaceUpdateJobDefinitionSuspensionStateBuilder
-
suspend
public void suspend()
Description copied from interface:UpdateJobDefinitionSuspensionStateBuilder
Suspends the provided job definitions. If a job definition is in state suspended, it will be ignored by the job executor.- Specified by:
suspend
in interfaceUpdateJobDefinitionSuspensionStateBuilder
-
validateParameters
protected void validateParameters()
-
getProcessDefinitionKey
public java.lang.String getProcessDefinitionKey()
-
getProcessDefinitionId
public java.lang.String getProcessDefinitionId()
-
getProcessDefinitionTenantId
public java.lang.String getProcessDefinitionTenantId()
-
isProcessDefinitionTenantIdSet
public boolean isProcessDefinitionTenantIdSet()
-
getJobDefinitionId
public java.lang.String getJobDefinitionId()
-
isIncludeJobs
public boolean isIncludeJobs()
-
getExecutionDate
public java.util.Date getExecutionDate()
-
-