Class UpdateJobDefinitionSuspensionStateBuilderImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.management.UpdateJobDefinitionSuspensionStateBuilderImpl
-
- All Implemented Interfaces:
UpdateJobDefinitionSuspensionStateBuilder
,UpdateJobDefinitionSuspensionStateSelectBuilder
,UpdateJobDefinitionSuspensionStateTenantBuilder
public class UpdateJobDefinitionSuspensionStateBuilderImpl extends Object implements UpdateJobDefinitionSuspensionStateBuilder, UpdateJobDefinitionSuspensionStateSelectBuilder, UpdateJobDefinitionSuspensionStateTenantBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutor
commandExecutor
protected Date
executionDate
protected boolean
includeJobs
protected boolean
isProcessDefinitionTenantIdSet
protected String
jobDefinitionId
protected String
processDefinitionId
protected String
processDefinitionKey
protected 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(String jobDefinitionId)
Selects the job definition with the given id.UpdateJobDefinitionSuspensionStateBuilderImpl
byProcessDefinitionId(String processDefinitionId)
Selects the job definitions of the process definition with the given id.UpdateJobDefinitionSuspensionStateBuilderImpl
byProcessDefinitionKey(String processDefinitionKey)
Selects the job definitions of the process definitions with the given key.UpdateJobDefinitionSuspensionStateBuilderImpl
executionDate(Date executionDate)
Specify when the suspension state should be updated.Date
getExecutionDate()
String
getJobDefinitionId()
String
getProcessDefinitionId()
String
getProcessDefinitionKey()
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(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 String jobDefinitionId
-
processDefinitionKey
protected String processDefinitionKey
-
processDefinitionId
protected String processDefinitionId
-
processDefinitionTenantId
protected String processDefinitionTenantId
-
isProcessDefinitionTenantIdSet
protected boolean isProcessDefinitionTenantIdSet
-
includeJobs
protected boolean includeJobs
-
executionDate
protected 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(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(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(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(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(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 String getProcessDefinitionKey()
-
getProcessDefinitionId
public String getProcessDefinitionId()
-
getProcessDefinitionTenantId
public String getProcessDefinitionTenantId()
-
isProcessDefinitionTenantIdSet
public boolean isProcessDefinitionTenantIdSet()
-
getJobDefinitionId
public String getJobDefinitionId()
-
isIncludeJobs
public boolean isIncludeJobs()
-
getExecutionDate
public Date getExecutionDate()
-
-