Package org.flowable.common.spring
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 Summary
FieldsModifier and TypeFieldDescriptionprotected CommonAutoDeploymentPropertiesprotected org.slf4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionCommonAutoDeploymentStrategy(CommonAutoDeploymentProperties deploymentProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeployResources(String deploymentNameHint, Resource[] resources, E engine) Performs deployment for the provided resources, using the provided name as a hint and the providedengineto perform deployment(s).protected abstract voiddeployResourcesInternal(String deploymentNameHint, Resource[] resources, E engine) Methods that should be implemented by sub classes to perform the actual deployment.protected StringdetermineLockName(String deploymentNameHint) protected StringdetermineResourceName(Resource resource) Determines the name to be used for the provided resource.protected abstract StringGets the deployment mode this strategy handles.protected abstract LockManagergetLockManager(E engine, String deploymentNameHint) Get the lock manager with the givenengineand thedeploymentNameHint.booleanhandlesMode(String mode) Determines whether the strategy handles deployments for the provided deployment mode.booleanbooleanvoidsetDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties)
-
Field Details
-
logger
protected org.slf4j.Logger logger -
deploymentProperties
-
-
Constructor Details
-
CommonAutoDeploymentStrategy
public CommonAutoDeploymentStrategy() -
CommonAutoDeploymentStrategy
-
-
Method Details
-
getDeploymentMode
Gets the deployment mode this strategy handles.- Returns:
- the name of the deployment mode
-
getLockManager
Get the lock manager with the givenengineand thedeploymentNameHint. 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
-
handlesMode
Description copied from interface:AutoDeploymentStrategyDetermines whether the strategy handles deployments for the provided deployment mode.- Specified by:
handlesModein interfaceAutoDeploymentStrategy<E>- Parameters:
mode- the mode to determine handling for- Returns:
- true if the strategy handles the mode; false otherwise
-
deployResources
Description copied from interface:AutoDeploymentStrategyPerforms deployment for the provided resources, using the provided name as a hint and the providedengineto perform deployment(s).- Specified by:
deployResourcesin interfaceAutoDeploymentStrategy<E>- Parameters:
deploymentNameHint- the hint for the name of deployment(s) performedresources- the resources to be deployedengine- 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) performedresources- the resources to be deployedengine- the engine to use for deployment(s)
-
determineResourceName
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
-
setDeploymentProperties
-
isUseLockForDeployments
public boolean isUseLockForDeployments() -
getDeploymentLockWaitTime
-
isThrowExceptionOnDeploymentFailure
public boolean isThrowExceptionOnDeploymentFailure() -
getLockName
-