Class CmmnDeployer
- java.lang.Object
-
- org.camunda.bpm.engine.impl.AbstractDefinitionDeployer<CaseDefinitionEntity>
-
- org.camunda.bpm.engine.impl.cmmn.deployer.CmmnDeployer
-
- All Implemented Interfaces:
Deployer
public class CmmnDeployer extends AbstractDefinitionDeployer<CaseDefinitionEntity>
Deployer
responsible to parse CMMN 1.0 XML files and create the properCaseDefinitionEntity
s.- Author:
- Roman Smirnov, Simon Zambrovski
-
-
Field Summary
Fields Modifier and Type Field Description static String[]
CMMN_RESOURCE_SUFFIXES
protected ExpressionManager
expressionManager
protected CmmnTransformer
transformer
-
Fields inherited from class org.camunda.bpm.engine.impl.AbstractDefinitionDeployer
DIAGRAM_SUFFIXES, idGenerator
-
-
Constructor Summary
Constructors Constructor Description CmmnDeployer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDefinitionToDeploymentCache(DeploymentCache deploymentCache, CaseDefinitionEntity definition)
Add a definition to the deployment cacheprotected CaseDefinitionEntity
findDefinitionByDeploymentAndKey(String deploymentId, String definitionKey)
Find a definition entity by deployment id and definition key.protected CaseDefinitionEntity
findLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId)
Find the last deployed definition entity by definition key and tenant id.protected CaseDefinitionManager
getCaseDefinitionManager()
ExpressionManager
getExpressionManager()
protected String[]
getResourcesSuffixes()
CmmnTransformer
getTransformer()
protected void
persistDefinition(CaseDefinitionEntity definition)
Persist definition entity into the database.void
setExpressionManager(ExpressionManager expressionManager)
void
setTransformer(CmmnTransformer transformer)
protected List<CaseDefinitionEntity>
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
-
CMMN_RESOURCE_SUFFIXES
public static final String[] CMMN_RESOURCE_SUFFIXES
-
expressionManager
protected ExpressionManager expressionManager
-
transformer
protected CmmnTransformer transformer
-
-
Method Detail
-
getResourcesSuffixes
protected String[] getResourcesSuffixes()
- Specified by:
getResourcesSuffixes
in classAbstractDefinitionDeployer<CaseDefinitionEntity>
- Returns:
- the list of resource suffixes for this cacheDeployer
-
transformDefinitions
protected List<CaseDefinitionEntity> transformDefinitions(DeploymentEntity deployment, ResourceEntity resource, Properties properties)
Description copied from class:AbstractDefinitionDeployer
Transform the resource entity into definition entities.- Specified by:
transformDefinitions
in classAbstractDefinitionDeployer<CaseDefinitionEntity>
- Parameters:
deployment
- the deployment the resources belongs toresource
- the resource to transform- Returns:
- a list of transformed definition entities
-
findDefinitionByDeploymentAndKey
protected CaseDefinitionEntity findDefinitionByDeploymentAndKey(String deploymentId, String definitionKey)
Description copied from class:AbstractDefinitionDeployer
Find a definition entity by deployment id and definition key.- Specified by:
findDefinitionByDeploymentAndKey
in classAbstractDefinitionDeployer<CaseDefinitionEntity>
- Parameters:
deploymentId
- the deployment iddefinitionKey
- the definition key- Returns:
- the corresponding definition entity or null if non is found
-
findLatestDefinitionByKeyAndTenantId
protected CaseDefinitionEntity findLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId)
Description copied from class:AbstractDefinitionDeployer
Find the last deployed definition entity by definition key and tenant id.- Specified by:
findLatestDefinitionByKeyAndTenantId
in classAbstractDefinitionDeployer<CaseDefinitionEntity>
- Returns:
- the corresponding definition entity or null if non is found
-
persistDefinition
protected void persistDefinition(CaseDefinitionEntity definition)
Description copied from class:AbstractDefinitionDeployer
Persist definition entity into the database.- Specified by:
persistDefinition
in classAbstractDefinitionDeployer<CaseDefinitionEntity>
- Parameters:
definition
- the definition entity
-
addDefinitionToDeploymentCache
protected void addDefinitionToDeploymentCache(DeploymentCache deploymentCache, CaseDefinitionEntity definition)
Description copied from class:AbstractDefinitionDeployer
Add a definition to the deployment cache- Specified by:
addDefinitionToDeploymentCache
in classAbstractDefinitionDeployer<CaseDefinitionEntity>
- Parameters:
deploymentCache
- the deployment cachedefinition
- the definition to add
-
getCaseDefinitionManager
protected CaseDefinitionManager getCaseDefinitionManager()
-
getExpressionManager
public ExpressionManager getExpressionManager()
-
setExpressionManager
public void setExpressionManager(ExpressionManager expressionManager)
-
getTransformer
public CmmnTransformer getTransformer()
-
setTransformer
public void setTransformer(CmmnTransformer transformer)
-
-