Class CommonAutoDeployer

java.lang.Object
com.flowable.platform.common.deployer.CommonAutoDeployer
All Implemented Interfaces:
java.util.EventListener, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
Direct Known Subclasses:
DefaultAppAutoDeployer, DefaultCaseDefinitionAutoDeployer, DefaultDmnDefinitionAutoDeployer, DefaultDocumentDefinitionAutoDeployer, DefaultEventRegistryDefinitionAutoDeployer, DefaultFormDefinitionAutoDeployer, DefaultProcessDefinitionAutoDeployer

public abstract class CommonAutoDeployer
extends java.lang.Object
implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.context.ApplicationContextAware
Author:
Filip Hrisafov
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected org.springframework.context.ApplicationContext applicationContext  
    protected org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties  
    protected java.util.Collection<org.springframework.core.io.Resource> deploymentResources  
  • Constructor Summary

    Constructors 
    Constructor Description
    CommonAutoDeployer​(java.util.Collection<org.springframework.core.io.Resource> deploymentResources)  
    CommonAutoDeployer​(java.util.Collection<org.springframework.core.io.Resource> deploymentResources, org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties)  
  • Method Summary

    Modifier and Type Method Description
    void deployResources()  
    protected abstract void deployResourcesInternal​(java.util.Collection<org.springframework.core.io.Resource> resources)
    Methods that should be implemented by sub classes to perform the actual deployment.
    protected java.lang.String determineLockName​(java.lang.String deploymentNameHint)  
    protected java.lang.String determineResourceName​(org.springframework.core.io.Resource resource)
    Determines the name to be used for the provided resource.
    java.time.Duration getDeploymentLockWaitTime()  
    org.flowable.common.spring.CommonAutoDeploymentProperties getDeploymentProperties()  
    protected abstract org.flowable.common.engine.impl.lock.LockManager getLockManager()
    Get the lock manager for the current deployer.
    java.lang.String getLockName()  
    boolean isThrowExceptionOnDeploymentFailure()  
    boolean isUseLockForDeployments()  
    void onApplicationEvent​(org.springframework.context.event.ContextRefreshedEvent event)  
    void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)  
    void setDeploymentProperties​(org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • deploymentProperties

      protected org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties
    • deploymentResources

      protected final java.util.Collection<org.springframework.core.io.Resource> deploymentResources
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
  • Constructor Details

    • CommonAutoDeployer

      public CommonAutoDeployer​(java.util.Collection<org.springframework.core.io.Resource> deploymentResources)
    • CommonAutoDeployer

      public CommonAutoDeployer​(java.util.Collection<org.springframework.core.io.Resource> deploymentResources, org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties)
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent​(org.springframework.context.event.ContextRefreshedEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
    • setApplicationContext

      public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • deployResources

      public void deployResources()
    • deployResourcesInternal

      protected abstract void deployResourcesInternal​(java.util.Collection<org.springframework.core.io.Resource> resources)
      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:
      resources - the resources to be deployed
    • getLockManager

      protected abstract org.flowable.common.engine.impl.lock.LockManager getLockManager()
      Get the lock manager for the current deployer. Used when the strategy has been configured to use lock for deployments.
      Returns:
      the lock manager
    • determineLockName

      protected java.lang.String determineLockName​(java.lang.String deploymentNameHint)
    • determineResourceName

      protected java.lang.String determineResourceName​(org.springframework.core.io.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 org.flowable.common.spring.CommonAutoDeploymentProperties getDeploymentProperties()
    • setDeploymentProperties

      public void setDeploymentProperties​(org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties)
    • isUseLockForDeployments

      public boolean isUseLockForDeployments()
    • getDeploymentLockWaitTime

      public java.time.Duration getDeploymentLockWaitTime()
    • isThrowExceptionOnDeploymentFailure

      public boolean isThrowExceptionOnDeploymentFailure()
    • getLockName

      public java.lang.String getLockName()