Class UpdateProcessDefinitionSuspensionStateBuilderImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.repository.UpdateProcessDefinitionSuspensionStateBuilderImpl
-
- All Implemented Interfaces:
UpdateProcessDefinitionSuspensionStateBuilder
,UpdateProcessDefinitionSuspensionStateSelectBuilder
,UpdateProcessDefinitionSuspensionStateTenantBuilder
public class UpdateProcessDefinitionSuspensionStateBuilderImpl extends java.lang.Object implements UpdateProcessDefinitionSuspensionStateBuilder, UpdateProcessDefinitionSuspensionStateSelectBuilder, UpdateProcessDefinitionSuspensionStateTenantBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutor
commandExecutor
protected java.util.Date
executionDate
protected boolean
includeProcessInstances
protected boolean
isTenantIdSet
protected java.lang.String
processDefinitionId
protected java.lang.String
processDefinitionKey
protected java.lang.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(java.lang.String processDefinitionId)
Selects the process definition with the given id.UpdateProcessDefinitionSuspensionStateBuilderImpl
byProcessDefinitionKey(java.lang.String processDefinitionKey)
Selects the process definitions with the given key.UpdateProcessDefinitionSuspensionStateBuilderImpl
executionDate(java.util.Date date)
Specify when the suspension state should be updated.java.util.Date
getExecutionDate()
java.lang.String
getProcessDefinitionId()
java.lang.String
getProcessDefinitionKey()
java.lang.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(java.lang.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 java.lang.String processDefinitionKey
-
processDefinitionId
protected java.lang.String processDefinitionId
-
includeProcessInstances
protected boolean includeProcessInstances
-
executionDate
protected java.util.Date executionDate
-
processDefinitionTenantId
protected java.lang.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(java.lang.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(java.lang.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(java.util.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(java.lang.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 java.lang.String getProcessDefinitionKey()
-
getProcessDefinitionId
public java.lang.String getProcessDefinitionId()
-
isIncludeProcessInstances
public boolean isIncludeProcessInstances()
-
getExecutionDate
public java.util.Date getExecutionDate()
-
getProcessDefinitionTenantId
public java.lang.String getProcessDefinitionTenantId()
-
isTenantIdSet
public boolean isTenantIdSet()
-
-