Class CommonAutoDeployer
java.lang.Object
com.flowable.platform.common.deployer.CommonAutoDeployer
- All Implemented Interfaces:
Lifecycle,Phased,SmartLifecycle
- Direct Known Subclasses:
DefaultAppAutoDeployer,DefaultCaseDefinitionAutoDeployer,DefaultDmnDefinitionAutoDeployer,DefaultDocumentDefinitionAutoDeployer,DefaultEventRegistryDefinitionAutoDeployer,DefaultFormDefinitionAutoDeployer,DefaultProcessDefinitionAutoDeployer
- Author:
- Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommonAutoDeploymentPropertiesprotected final Collection<Resource>protected final Objectprotected final org.slf4j.Loggerprotected booleanFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionCommonAutoDeployer(Collection<Resource> deploymentResources) CommonAutoDeployer(Collection<Resource> deploymentResources, CommonAutoDeploymentProperties deploymentProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract voiddeployResourcesInternal(Collection<Resource> resources) 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 LockManagerGet the lock manager for the current deployer.abstract intgetPhase()booleanbooleanbooleanvoidsetDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties) voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartup, stop
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
deploymentProperties
-
deploymentResources
-
lifeCycleMonitor
-
running
protected boolean running
-
-
Constructor Details
-
CommonAutoDeployer
-
CommonAutoDeployer
public CommonAutoDeployer(Collection<Resource> deploymentResources, CommonAutoDeploymentProperties deploymentProperties)
-
-
Method Details
-
start
public void start() -
stop
public void stop() -
isRunning
public boolean isRunning() -
getPhase
public abstract int getPhase()- Specified by:
getPhasein interfacePhased- Specified by:
getPhasein interfaceSmartLifecycle
-
deployResources
public void deployResources() -
deployResourcesInternal
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
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
-
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
-