Class UpdateProcessDefinitionSuspensionStateBuilderImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.repository.UpdateProcessDefinitionSuspensionStateBuilderImpl
-
- All Implemented Interfaces:
UpdateProcessDefinitionSuspensionStateBuilder
,UpdateProcessDefinitionSuspensionStateSelectBuilder
,UpdateProcessDefinitionSuspensionStateTenantBuilder
public class UpdateProcessDefinitionSuspensionStateBuilderImpl extends Object implements UpdateProcessDefinitionSuspensionStateBuilder, UpdateProcessDefinitionSuspensionStateSelectBuilder, UpdateProcessDefinitionSuspensionStateTenantBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutor
commandExecutor
protected Date
executionDate
protected boolean
includeProcessInstances
protected boolean
isTenantIdSet
protected String
processDefinitionId
protected String
processDefinitionKey
protected String
processDefinitionTenantId
-
Constructor Summary
Constructors Constructor Description UpdateProcessDefinitionSuspensionStateBuilderImpl()
Creates a builder without CommandExecutor which can not be used to update the suspension state viaactivate()
orsuspend()
.UpdateProcessDefinitionSuspensionStateBuilderImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
Activates the provided process definitions.UpdateProcessDefinitionSuspensionStateBuilderImpl
byProcessDefinitionId(String processDefinitionId)
Selects the process definition with the given id.UpdateProcessDefinitionSuspensionStateBuilderImpl
byProcessDefinitionKey(String processDefinitionKey)
Selects the process definitions with the given key.UpdateProcessDefinitionSuspensionStateBuilderImpl
executionDate(Date date)
Specify when the suspension state should be updated.Date
getExecutionDate()
String
getProcessDefinitionId()
String
getProcessDefinitionKey()
String
getProcessDefinitionTenantId()
UpdateProcessDefinitionSuspensionStateBuilderImpl
includeProcessInstances(boolean includeProcessInstance)
Specify if the suspension states of the process instances of the provided process definitions should also be updated.boolean
isIncludeProcessInstances()
boolean
isTenantIdSet()
UpdateProcessDefinitionSuspensionStateBuilderImpl
processDefinitionTenantId(String tenantId)
Specify the id of the tenant the process definition belongs to.UpdateProcessDefinitionSuspensionStateBuilderImpl
processDefinitionWithoutTenantId()
Specify that the process definition belongs to no tenant.void
suspend()
Suspends the provided process definitions.protected void
validateParameters()
-
-
-
Field Detail
-
commandExecutor
protected final CommandExecutor commandExecutor
-
processDefinitionKey
protected String processDefinitionKey
-
processDefinitionId
protected String processDefinitionId
-
includeProcessInstances
protected boolean includeProcessInstances
-
executionDate
protected Date executionDate
-
processDefinitionTenantId
protected String processDefinitionTenantId
-
isTenantIdSet
protected boolean isTenantIdSet
-
-
Constructor Detail
-
UpdateProcessDefinitionSuspensionStateBuilderImpl
public UpdateProcessDefinitionSuspensionStateBuilderImpl(CommandExecutor commandExecutor)
-
UpdateProcessDefinitionSuspensionStateBuilderImpl
public UpdateProcessDefinitionSuspensionStateBuilderImpl()
Creates a builder without CommandExecutor which can not be used to update the suspension state viaactivate()
orsuspend()
. Can be used in combination with your own command.
-
-
Method Detail
-
byProcessDefinitionId
public UpdateProcessDefinitionSuspensionStateBuilderImpl byProcessDefinitionId(String processDefinitionId)
Description copied from interface:UpdateProcessDefinitionSuspensionStateSelectBuilder
Selects the process definition with the given id.- Specified by:
byProcessDefinitionId
in interfaceUpdateProcessDefinitionSuspensionStateSelectBuilder
- Parameters:
processDefinitionId
- id of the process definition- Returns:
- the builder
-
byProcessDefinitionKey
public UpdateProcessDefinitionSuspensionStateBuilderImpl byProcessDefinitionKey(String processDefinitionKey)
Description copied from interface:UpdateProcessDefinitionSuspensionStateSelectBuilder
Selects the process definitions with the given key.- Specified by:
byProcessDefinitionKey
in interfaceUpdateProcessDefinitionSuspensionStateSelectBuilder
- Parameters:
processDefinitionKey
- key of the process definition- Returns:
- the builder
-
includeProcessInstances
public UpdateProcessDefinitionSuspensionStateBuilderImpl includeProcessInstances(boolean includeProcessInstance)
Description copied from interface:UpdateProcessDefinitionSuspensionStateBuilder
Specify if the suspension states of the process instances of the provided process definitions should also be updated. Default isfalse
.- Specified by:
includeProcessInstances
in interfaceUpdateProcessDefinitionSuspensionStateBuilder
- Parameters:
includeProcessInstance
- iftrue
, all related process instances will be activated / suspended too.- Returns:
- the builder
-
executionDate
public UpdateProcessDefinitionSuspensionStateBuilderImpl executionDate(Date date)
Description copied from interface:UpdateProcessDefinitionSuspensionStateBuilder
Specify when the suspension state should be updated. Note that the job executor needs to be active to use this.- Specified by:
executionDate
in interfaceUpdateProcessDefinitionSuspensionStateBuilder
- Parameters:
date
- the date on which the process definition will be activated / suspended. Ifnull
, the process definition is activated / suspended immediately.- Returns:
- the builder
-
processDefinitionWithoutTenantId
public UpdateProcessDefinitionSuspensionStateBuilderImpl processDefinitionWithoutTenantId()
Description copied from interface:UpdateProcessDefinitionSuspensionStateTenantBuilder
Specify that the process definition belongs to no tenant.- Specified by:
processDefinitionWithoutTenantId
in interfaceUpdateProcessDefinitionSuspensionStateTenantBuilder
- Returns:
- the builder
-
processDefinitionTenantId
public UpdateProcessDefinitionSuspensionStateBuilderImpl processDefinitionTenantId(String tenantId)
Description copied from interface:UpdateProcessDefinitionSuspensionStateTenantBuilder
Specify the id of the tenant the process definition belongs to.- Specified by:
processDefinitionTenantId
in interfaceUpdateProcessDefinitionSuspensionStateTenantBuilder
- Parameters:
tenantId
- the id of the tenant- Returns:
- the builder
-
activate
public void activate()
Description copied from interface:UpdateProcessDefinitionSuspensionStateBuilder
Activates the provided process definitions.- Specified by:
activate
in interfaceUpdateProcessDefinitionSuspensionStateBuilder
-
suspend
public void suspend()
Description copied from interface:UpdateProcessDefinitionSuspensionStateBuilder
Suspends the provided process definitions. If a process definition is in state suspended, it will not be possible to start new process instances based on this process definition.- Specified by:
suspend
in interfaceUpdateProcessDefinitionSuspensionStateBuilder
-
validateParameters
protected void validateParameters()
-
getProcessDefinitionKey
public String getProcessDefinitionKey()
-
getProcessDefinitionId
public String getProcessDefinitionId()
-
isIncludeProcessInstances
public boolean isIncludeProcessInstances()
-
getExecutionDate
public Date getExecutionDate()
-
getProcessDefinitionTenantId
public String getProcessDefinitionTenantId()
-
isTenantIdSet
public boolean isTenantIdSet()
-
-