Class DefaultDmnTransform
- java.lang.Object
-
- org.camunda.bpm.dmn.engine.impl.transform.DefaultDmnTransform
-
- All Implemented Interfaces:
DmnElementTransformContext
,DmnTransform
public class DefaultDmnTransform extends Object implements DmnTransform, DmnElementTransformContext
-
-
Field Summary
Fields Modifier and Type Field Description protected DmnDataTypeTransformerRegistry
dataTypeTransformerRegistry
protected DmnDecisionImpl
decision
protected DmnDecisionTableImpl
decisionTable
protected DmnElementTransformHandlerRegistry
handlerRegistry
protected DmnHitPolicyHandlerRegistry
hitPolicyHandlerRegistry
protected DmnModelInstance
modelInstance
protected Object
parent
protected DmnTransformer
transformer
protected List<DmnTransformListener>
transformListeners
-
Constructor Summary
Constructors Constructor Description DefaultDmnTransform(DmnTransformer transformer)
-
Method Summary
-
-
-
Field Detail
-
transformer
protected DmnTransformer transformer
-
transformListeners
protected List<DmnTransformListener> transformListeners
-
handlerRegistry
protected DmnElementTransformHandlerRegistry handlerRegistry
-
modelInstance
protected DmnModelInstance modelInstance
-
parent
protected Object parent
-
decision
protected DmnDecisionImpl decision
-
decisionTable
protected DmnDecisionTableImpl decisionTable
-
dataTypeTransformerRegistry
protected DmnDataTypeTransformerRegistry dataTypeTransformerRegistry
-
hitPolicyHandlerRegistry
protected DmnHitPolicyHandlerRegistry hitPolicyHandlerRegistry
-
-
Constructor Detail
-
DefaultDmnTransform
public DefaultDmnTransform(DmnTransformer transformer)
-
-
Method Detail
-
setModelInstance
public void setModelInstance(File file)
Description copied from interface:DmnTransform
Set the DMN model instance to transform as file.- Specified by:
setModelInstance
in interfaceDmnTransform
- Parameters:
file
- the file of the DMN model instance
-
modelInstance
public DmnTransform modelInstance(File file)
Description copied from interface:DmnTransform
Set the DMN model instance to transform as file.- Specified by:
modelInstance
in interfaceDmnTransform
- Parameters:
file
- the file of the DMN model instance- Returns:
- this DmnTransform
-
setModelInstance
public void setModelInstance(InputStream inputStream)
Description copied from interface:DmnTransform
Set the DMN model instance to transform as input stream.- Specified by:
setModelInstance
in interfaceDmnTransform
- Parameters:
inputStream
- the input stream of the DMN model instance
-
modelInstance
public DmnTransform modelInstance(InputStream inputStream)
Description copied from interface:DmnTransform
Set the DMN model instance to transform as input stream.- Specified by:
modelInstance
in interfaceDmnTransform
- Parameters:
inputStream
- the input stream of the DMN model instance- Returns:
- this DmnTransform
-
setModelInstance
public void setModelInstance(DmnModelInstance modelInstance)
Description copied from interface:DmnTransform
Set the DMN model instance to transform.- Specified by:
setModelInstance
in interfaceDmnTransform
- Parameters:
modelInstance
- the DMN model instance
-
modelInstance
public DmnTransform modelInstance(DmnModelInstance modelInstance)
Description copied from interface:DmnTransform
Set the DMN model instance to transform.- Specified by:
modelInstance
in interfaceDmnTransform
- Parameters:
modelInstance
- the DMN model instance- Returns:
- this DmnTransform
-
transformDecisionRequirementsGraph
public <T extends DmnDecisionRequirementsGraph> T transformDecisionRequirementsGraph()
Description copied from interface:DmnTransform
Transform the decision requirements graph and all containing decisions of the DMN model instance.- Specified by:
transformDecisionRequirementsGraph
in interfaceDmnTransform
-
transformDefinitions
protected DmnDecisionRequirementsGraph transformDefinitions(Definitions definitions)
-
transformDecisions
public <T extends DmnDecision> List<T> transformDecisions()
Description copied from interface:DmnTransform
Transform all decisions of the DMN model instance.- Specified by:
transformDecisions
in interfaceDmnTransform
-
transformDecisions
protected List<DmnDecision> transformDecisions(Collection<Decision> decisions)
-
transformIndividualDecisions
protected Map<String,DmnDecisionImpl> transformIndividualDecisions(Collection<Decision> decisions)
-
buildDecisionRequirements
protected void buildDecisionRequirements(Collection<Decision> decisions, Map<String,DmnDecisionImpl> dmnDecisions)
-
ensureNoLoopInDecisions
protected void ensureNoLoopInDecisions(List<DmnDecision> dmnDecisionList)
-
ensureNoLoopInDecision
protected void ensureNoLoopInDecision(DmnDecision decision, List<String> parentDecisionList, List<String> visitedDecisions)
-
getRequiredDmnDecisions
protected List<DmnDecision> getRequiredDmnDecisions(Decision decision, Map<String,DmnDecisionImpl> dmnDecisions)
-
transformDecision
protected DmnDecisionImpl transformDecision(Decision decision)
-
transformDecisionTable
protected DmnDecisionTableImpl transformDecisionTable(DecisionTable decisionTable)
-
transformDecisionTableInput
protected DmnDecisionTableInputImpl transformDecisionTableInput(Input input)
-
transformDecisionTableOutput
protected DmnDecisionTableOutputImpl transformDecisionTableOutput(Output output)
-
transformDecisionTableRule
protected DmnDecisionTableRuleImpl transformDecisionTableRule(Rule rule)
-
transformInputExpression
protected DmnExpressionImpl transformInputExpression(InputExpression inputExpression)
-
transformInputEntry
protected DmnExpressionImpl transformInputEntry(InputEntry inputEntry)
-
transformOutputEntry
protected DmnExpressionImpl transformOutputEntry(OutputEntry outputEntry)
-
transformDecisionLiteralExpression
protected DmnDecisionLiteralExpressionImpl transformDecisionLiteralExpression(Decision decision, LiteralExpression literalExpression)
-
transformLiteralExpression
protected DmnExpressionImpl transformLiteralExpression(LiteralExpression literalExpression)
-
transformVariable
protected DmnVariableImpl transformVariable(Variable variable)
-
notifyTransformListeners
protected void notifyTransformListeners(Decision decision, DmnDecision dmnDecision)
-
notifyTransformListeners
protected void notifyTransformListeners(Input input, DmnDecisionTableInputImpl dmnInput)
-
notifyTransformListeners
protected void notifyTransformListeners(Definitions definitions, DmnDecisionRequirementsGraphImpl dmnDecisionRequirementsGraph)
-
notifyTransformListeners
protected void notifyTransformListeners(Output output, DmnDecisionTableOutputImpl dmnOutput)
-
notifyTransformListeners
protected void notifyTransformListeners(Rule rule, DmnDecisionTableRuleImpl dmnRule)
-
getModelInstance
public DmnModelInstance getModelInstance()
- Specified by:
getModelInstance
in interfaceDmnElementTransformContext
- Returns:
- the transformed DMN model instance
-
getParent
public Object getParent()
- Specified by:
getParent
in interfaceDmnElementTransformContext
- Returns:
- the already transformed parent of the current transformed element
-
getDecision
public DmnDecision getDecision()
- Specified by:
getDecision
in interfaceDmnElementTransformContext
- Returns:
- the already transformed decision to which the current transformed element belongs
-
getDataTypeTransformerRegistry
public DmnDataTypeTransformerRegistry getDataTypeTransformerRegistry()
- Specified by:
getDataTypeTransformerRegistry
in interfaceDmnElementTransformContext
- Returns:
- the
DmnDataTypeTransformerRegistry
to use
-
getHitPolicyHandlerRegistry
public DmnHitPolicyHandlerRegistry getHitPolicyHandlerRegistry()
- Specified by:
getHitPolicyHandlerRegistry
in interfaceDmnElementTransformContext
- Returns:
- the
DmnHitPolicyHandlerRegistry
to use
-
-