Class DecisionDefinitionDeployer
- java.lang.Object
-
- org.camunda.bpm.engine.impl.AbstractDefinitionDeployer<DecisionDefinitionEntity>
-
- org.camunda.bpm.engine.impl.dmn.deployer.DecisionDefinitionDeployer
-
- All Implemented Interfaces:
Deployer
public class DecisionDefinitionDeployer extends AbstractDefinitionDeployer<DecisionDefinitionEntity>
Deployerresponsible to parse DMN 1.1 XML files and create the properDecisionDefinitionEntitys. Since it uses the result of theDecisionRequirementsDefinitionDeployerto avoid duplicated parsing, the DecisionRequirementsDefinitionDeployer must process the deployment before this cacheDeployer.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]DMN_RESOURCE_SUFFIXESprotected static DecisionLoggerLOGprotected DmnTransformertransformer-
Fields inherited from class org.camunda.bpm.engine.impl.AbstractDefinitionDeployer
DIAGRAM_SUFFIXES, idGenerator
-
-
Constructor Summary
Constructors Constructor Description DecisionDefinitionDeployer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDefinitionToDeploymentCache(DeploymentCache deploymentCache, DecisionDefinitionEntity definition)Add a definition to the deployment cacheprotected DecisionDefinitionEntityfindDefinitionByDeploymentAndKey(java.lang.String deploymentId, java.lang.String definitionKey)Find a definition entity by deployment id and definition key.protected DecisionRequirementsDefinitionEntityfindDeployedDrdForResource(DeploymentEntity deployment, java.lang.String resourceName)protected DecisionDefinitionEntityfindLatestDefinitionByKeyAndTenantId(java.lang.String definitionKey, java.lang.String tenantId)Find the last deployed definition entity by definition key and tenant id.protected DecisionDefinitionManagergetDecisionDefinitionManager()protected java.lang.String[]getResourcesSuffixes()DmnTransformergetTransformer()protected voidpersistDefinition(DecisionDefinitionEntity definition)Persist definition entity into the database.voidsetTransformer(DmnTransformer transformer)protected java.util.List<DecisionDefinitionEntity>transformDefinitions(DeploymentEntity deployment, ResourceEntity resource, Properties properties)Transform the resource entity into definition entities.-
Methods inherited from class org.camunda.bpm.engine.impl.AbstractDefinitionDeployer
definitionAddedToDeploymentCache, deploy, ensureNoDuplicateDefinitionKeys, generateDefinitionId, getCommandContext, getDefinitionDiagramResourceName, getDeploymentCache, getDiagramResourceForDefinition, getDiagramSuffixes, getGeneralDiagramResourceName, getIdGenerator, getNextVersion, getProcessEngineConfiguration, handlePersistedDefinition, isResourceHandled, loadDefinitions, parseDefinitionResources, persistDefinitions, persistedDefinitionLoaded, postProcessDefinitions, registerDefinition, setIdGenerator, stripDefinitionFileSuffix, transformResource, updateDefinitionByLatestDefinition, updateDefinitionByPersistedDefinition
-
-
-
-
Field Detail
-
LOG
protected static final DecisionLogger LOG
-
DMN_RESOURCE_SUFFIXES
public static final java.lang.String[] DMN_RESOURCE_SUFFIXES
-
transformer
protected DmnTransformer transformer
-
-
Method Detail
-
getResourcesSuffixes
protected java.lang.String[] getResourcesSuffixes()
- Specified by:
getResourcesSuffixesin classAbstractDefinitionDeployer<DecisionDefinitionEntity>- Returns:
- the list of resource suffixes for this cacheDeployer
-
transformDefinitions
protected java.util.List<DecisionDefinitionEntity> transformDefinitions(DeploymentEntity deployment, ResourceEntity resource, Properties properties)
Description copied from class:AbstractDefinitionDeployerTransform the resource entity into definition entities.- Specified by:
transformDefinitionsin classAbstractDefinitionDeployer<DecisionDefinitionEntity>- Parameters:
deployment- the deployment the resources belongs toresource- the resource to transform- Returns:
- a list of transformed definition entities
-
findDeployedDrdForResource
protected DecisionRequirementsDefinitionEntity findDeployedDrdForResource(DeploymentEntity deployment, java.lang.String resourceName)
-
findDefinitionByDeploymentAndKey
protected DecisionDefinitionEntity findDefinitionByDeploymentAndKey(java.lang.String deploymentId, java.lang.String definitionKey)
Description copied from class:AbstractDefinitionDeployerFind a definition entity by deployment id and definition key.- Specified by:
findDefinitionByDeploymentAndKeyin classAbstractDefinitionDeployer<DecisionDefinitionEntity>- Parameters:
deploymentId- the deployment iddefinitionKey- the definition key- Returns:
- the corresponding definition entity or null if non is found
-
findLatestDefinitionByKeyAndTenantId
protected DecisionDefinitionEntity findLatestDefinitionByKeyAndTenantId(java.lang.String definitionKey, java.lang.String tenantId)
Description copied from class:AbstractDefinitionDeployerFind the last deployed definition entity by definition key and tenant id.- Specified by:
findLatestDefinitionByKeyAndTenantIdin classAbstractDefinitionDeployer<DecisionDefinitionEntity>- Returns:
- the corresponding definition entity or null if non is found
-
persistDefinition
protected void persistDefinition(DecisionDefinitionEntity definition)
Description copied from class:AbstractDefinitionDeployerPersist definition entity into the database.- Specified by:
persistDefinitionin classAbstractDefinitionDeployer<DecisionDefinitionEntity>- Parameters:
definition- the definition entity
-
addDefinitionToDeploymentCache
protected void addDefinitionToDeploymentCache(DeploymentCache deploymentCache, DecisionDefinitionEntity definition)
Description copied from class:AbstractDefinitionDeployerAdd a definition to the deployment cache- Specified by:
addDefinitionToDeploymentCachein classAbstractDefinitionDeployer<DecisionDefinitionEntity>- Parameters:
deploymentCache- the deployment cachedefinition- the definition to add
-
getDecisionDefinitionManager
protected DecisionDefinitionManager getDecisionDefinitionManager()
-
getTransformer
public DmnTransformer getTransformer()
-
setTransformer
public void setTransformer(DmnTransformer transformer)
-
-