org.camunda.bpm.engine.impl.dmn.deployer
Class DecisionDefinitionDeployer

java.lang.Object
  extended by org.camunda.bpm.engine.impl.AbstractDefinitionDeployer<DecisionDefinitionEntity>
      extended by org.camunda.bpm.engine.impl.dmn.deployer.DecisionDefinitionDeployer
All Implemented Interfaces:
Deployer

public class DecisionDefinitionDeployer
extends AbstractDefinitionDeployer<DecisionDefinitionEntity>

Deployer responsible to parse DMN 1.1 XML files and create the proper DecisionDefinitionEntitys. Since it uses the result of the DecisionRequirementsDefinitionDeployer to avoid duplicated parsing, the DecisionRequirementsDefinitionDeployer must process the deployment before this deployer.


Field Summary
static String[] DMN_RESOURCE_SUFFIXES
           
protected static DecisionLogger LOG
           
protected  org.camunda.bpm.dmn.engine.impl.spi.transform.DmnTransformer transformer
           
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractDefinitionDeployer
DIAGRAM_SUFFIXES, idGenerator
 
Constructor Summary
DecisionDefinitionDeployer()
           
 
Method Summary
protected  void addDefinitionToDeploymentCache(DeploymentCache deploymentCache, DecisionDefinitionEntity definition)
          Add a definition to the deployment cache
protected  DecisionDefinitionEntity findDefinitionByDeploymentAndKey(String deploymentId, String definitionKey)
          Find a definition entity by deployment id and definition key.
protected  DecisionRequirementsDefinitionEntity findDeployedDrdForResource(DeploymentEntity deployment, String resourceName)
           
protected  DecisionDefinitionEntity findLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId)
          Find the last deployed definition entity by definition key and tenant id.
protected  DecisionDefinitionManager getDecisionDefinitionManager()
           
protected  String[] getResourcesSuffixes()
           
 org.camunda.bpm.dmn.engine.impl.spi.transform.DmnTransformer getTransformer()
           
protected  void persistDefinition(DecisionDefinitionEntity definition)
          Persist definition entity into the database.
 void setTransformer(org.camunda.bpm.dmn.engine.impl.spi.transform.DmnTransformer transformer)
           
protected  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, generateDiagramResourceForDefinition, getCommandContext, getDefinitionDiagramResourceName, getDeploymentCache, getDiagramResourceForDefinition, getDiagramSuffixes, getGeneralDiagramResourceName, getIdGenerator, getNextVersion, getProcessEngineConfiguration, handlePersistedDefinition, isResourceHandled, loadDefinitions, parseDefinitionResources, persistDefinitions, persistedDefinitionLoaded, postProcessDefinitions, registerDefinition, setIdGenerator, stripDefinitionFileSuffix, transformResource, updateDefinitionByLatestDefinition, updateDefinitionByPersistedDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final DecisionLogger LOG

DMN_RESOURCE_SUFFIXES

public static final String[] DMN_RESOURCE_SUFFIXES

transformer

protected org.camunda.bpm.dmn.engine.impl.spi.transform.DmnTransformer transformer
Constructor Detail

DecisionDefinitionDeployer

public DecisionDefinitionDeployer()
Method Detail

getResourcesSuffixes

protected String[] getResourcesSuffixes()
Specified by:
getResourcesSuffixes in class AbstractDefinitionDeployer<DecisionDefinitionEntity>
Returns:
the list of resource suffixes for this deployer

transformDefinitions

protected List<DecisionDefinitionEntity> transformDefinitions(DeploymentEntity deployment,
                                                              ResourceEntity resource,
                                                              Properties properties)
Description copied from class: AbstractDefinitionDeployer
Transform the resource entity into definition entities.

Specified by:
transformDefinitions in class AbstractDefinitionDeployer<DecisionDefinitionEntity>
Parameters:
deployment - the deployment the resources belongs to
resource - the resource to transform
Returns:
a list of transformed definition entities

findDeployedDrdForResource

protected DecisionRequirementsDefinitionEntity findDeployedDrdForResource(DeploymentEntity deployment,
                                                                          String resourceName)

findDefinitionByDeploymentAndKey

protected DecisionDefinitionEntity findDefinitionByDeploymentAndKey(String deploymentId,
                                                                    String definitionKey)
Description copied from class: AbstractDefinitionDeployer
Find a definition entity by deployment id and definition key.

Specified by:
findDefinitionByDeploymentAndKey in class AbstractDefinitionDeployer<DecisionDefinitionEntity>
Parameters:
deploymentId - the deployment id
definitionKey - the definition key
Returns:
the corresponding definition entity or null if non is found

findLatestDefinitionByKeyAndTenantId

protected DecisionDefinitionEntity 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 class AbstractDefinitionDeployer<DecisionDefinitionEntity>
Returns:
the corresponding definition entity or null if non is found

persistDefinition

protected void persistDefinition(DecisionDefinitionEntity definition)
Description copied from class: AbstractDefinitionDeployer
Persist definition entity into the database.

Specified by:
persistDefinition in class AbstractDefinitionDeployer<DecisionDefinitionEntity>
Parameters:
definition - the definition entity

addDefinitionToDeploymentCache

protected void addDefinitionToDeploymentCache(DeploymentCache deploymentCache,
                                              DecisionDefinitionEntity definition)
Description copied from class: AbstractDefinitionDeployer
Add a definition to the deployment cache

Specified by:
addDefinitionToDeploymentCache in class AbstractDefinitionDeployer<DecisionDefinitionEntity>
Parameters:
deploymentCache - the deployment cache
definition - the definition to add

getDecisionDefinitionManager

protected DecisionDefinitionManager getDecisionDefinitionManager()

getTransformer

public org.camunda.bpm.dmn.engine.impl.spi.transform.DmnTransformer getTransformer()

setTransformer

public void setTransformer(org.camunda.bpm.dmn.engine.impl.spi.transform.DmnTransformer transformer)


Copyright © 2016 camunda services GmbH. All rights reserved.