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.ApplicationContextapplicationContextprotected org.flowable.common.spring.CommonAutoDeploymentPropertiesdeploymentPropertiesprotected 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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddeployResources()protected abstract voiddeployResourcesInternal(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.StringdetermineLockName(java.lang.String deploymentNameHint)protected java.lang.StringdetermineResourceName(org.springframework.core.io.Resource resource)Determines the name to be used for the provided resource.java.time.DurationgetDeploymentLockWaitTime()org.flowable.common.spring.CommonAutoDeploymentPropertiesgetDeploymentProperties()protected abstract org.flowable.common.engine.impl.lock.LockManagergetLockManager()Get the lock manager for the current deployer.java.lang.StringgetLockName()booleanisThrowExceptionOnDeploymentFailure()booleanisUseLockForDeployments()voidonApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetDeploymentProperties(org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties)
-
-
-
Field Detail
-
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 Detail
-
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 Detail
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.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()
-
-