Class CommonAutoDeploymentStrategy<E>

java.lang.Object
org.flowable.common.spring.CommonAutoDeploymentStrategy<E>
All Implemented Interfaces:
AutoDeploymentStrategy<E>
Direct Known Subclasses:
AbstractCmmnAutoDeploymentStrategy, AbstractDmnAutoDeploymentStrategy, AbstractEventAutoDeploymentStrategy, AbstractProcessAutoDeploymentStrategy

public abstract class CommonAutoDeploymentStrategy<E> extends Object implements AutoDeploymentStrategy<E>
Common base class for implementations of AutoDeploymentStrategy. It has support for using a lock manager to lock before doing the deployment.
Author:
Filip Hrisafov
  • Field Details

  • Constructor Details

    • CommonAutoDeploymentStrategy

      public CommonAutoDeploymentStrategy()
    • CommonAutoDeploymentStrategy

      public CommonAutoDeploymentStrategy(CommonAutoDeploymentProperties deploymentProperties)
  • Method Details

    • getDeploymentMode

      protected abstract String getDeploymentMode()
      Gets the deployment mode this strategy handles.
      Returns:
      the name of the deployment mode
    • getLockManager

      protected abstract LockManager getLockManager(E engine, String deploymentNameHint)
      Get the lock manager with the given engine and the deploymentNameHint. Used when the strategy has been configured to use lock for deployments.
      Parameters:
      engine - the engine that can be used to get the lock manager.
      deploymentNameHint - the deployment name hint
      Returns:
      the lock manager
    • determineLockName

      protected String determineLockName(String deploymentNameHint)
    • handlesMode

      public boolean handlesMode(String mode)
      Description copied from interface: AutoDeploymentStrategy
      Determines whether the strategy handles deployments for the provided deployment mode.
      Specified by:
      handlesMode in interface AutoDeploymentStrategy<E>
      Parameters:
      mode - the mode to determine handling for
      Returns:
      true if the strategy handles the mode; false otherwise
    • deployResources

      public void deployResources(String deploymentNameHint, Resource[] resources, E engine)
      Description copied from interface: AutoDeploymentStrategy
      Performs deployment for the provided resources, using the provided name as a hint and the provided engine to perform deployment(s).
      Specified by:
      deployResources in interface AutoDeploymentStrategy<E>
      Parameters:
      deploymentNameHint - the hint for the name of deployment(s) performed
      resources - the resources to be deployed
      engine - the engine to use for deployment(s)
    • deployResourcesInternal

      protected abstract void deployResourcesInternal(String deploymentNameHint, Resource[] resources, E engine)
      Methods that should be implemented by sub classes to perform the actual deployment. If use lock for deployments is used than this methods is called with an already acquired lock.
      Parameters:
      deploymentNameHint - the hint for the name of deployment(s) performed
      resources - the resources to be deployed
      engine - the engine to use for deployment(s)
    • determineResourceName

      protected String determineResourceName(Resource resource)
      Determines the name to be used for the provided resource.
      Parameters:
      resource - the resource to get the name for
      Returns:
      the name of the resource
    • getDeploymentProperties

      public CommonAutoDeploymentProperties getDeploymentProperties()
    • setDeploymentProperties

      public void setDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties)
    • isUseLockForDeployments

      public boolean isUseLockForDeployments()
    • getDeploymentLockWaitTime

      public Duration getDeploymentLockWaitTime()
    • isThrowExceptionOnDeploymentFailure

      public boolean isThrowExceptionOnDeploymentFailure()
    • getLockName

      public String getLockName()