org.camunda.bpm.engine.impl.repository
Class UpdateProcessDefinitionSuspensionStateBuilderImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.repository.UpdateProcessDefinitionSuspensionStateBuilderImpl
All Implemented Interfaces:
UpdateProcessDefinitionSuspensionStateBuilder, UpdateProcessDefinitionSuspensionStateSelectBuilder, UpdateProcessDefinitionSuspensionStateTenantBuilder

public class UpdateProcessDefinitionSuspensionStateBuilderImpl
extends Object
implements UpdateProcessDefinitionSuspensionStateBuilder, UpdateProcessDefinitionSuspensionStateSelectBuilder, UpdateProcessDefinitionSuspensionStateTenantBuilder


Field Summary
protected  CommandExecutor commandExecutor
           
protected  Date executionDate
           
protected  boolean includeProcessInstances
           
protected  boolean isTenantIdSet
           
protected  String processDefinitionId
           
protected  String processDefinitionKey
           
protected  String processDefinitionTenantId
           
 
Constructor Summary
UpdateProcessDefinitionSuspensionStateBuilderImpl()
          Creates a builder without CommandExecutor which can not be used to update the suspension state via activate() or suspend().
UpdateProcessDefinitionSuspensionStateBuilderImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 via activate() or suspend(). 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 interface UpdateProcessDefinitionSuspensionStateSelectBuilder
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 interface UpdateProcessDefinitionSuspensionStateSelectBuilder
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 is false.

Specified by:
includeProcessInstances in interface UpdateProcessDefinitionSuspensionStateBuilder
Parameters:
includeProcessInstance - if true, 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 interface UpdateProcessDefinitionSuspensionStateBuilder
Parameters:
date - the date on which the process definition will be activated / suspended. If null, 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 interface UpdateProcessDefinitionSuspensionStateTenantBuilder
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 interface UpdateProcessDefinitionSuspensionStateTenantBuilder
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 interface UpdateProcessDefinitionSuspensionStateBuilder

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 interface UpdateProcessDefinitionSuspensionStateBuilder

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()


Copyright © 2016 camunda services GmbH. All rights reserved.