Class DmnJsonConverterUtil
- java.lang.Object
-
- org.flowable.dmn.editor.converter.DmnJsonConverterUtil
-
- All Implemented Interfaces:
DmnStencilConstants,EditorJsonConstants
public class DmnJsonConverterUtil extends Object implements EditorJsonConstants, DmnStencilConstants
- Author:
- Yvo Swillens
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDmnJsonConverterUtil.JsonLookupResult
-
Field Summary
Fields Modifier and Type Field Description protected static doublelineWidthprotected static org.slf4j.LoggerLOGGERprotected static com.fasterxml.jackson.databind.ObjectMapperobjectMapper-
Fields inherited from interface org.flowable.dmn.editor.constants.DmnStencilConstants
PROPERTY_DECISION_TABLE_REFERENCE, PROPERTY_DOCUMENTATION, PROPERTY_DRD_ID, PROPERTY_NAME, PROPERTY_OVERRIDE_ID, STENCIL_DECISION, STENCIL_ENCAPSULATED_DECISIONS, STENCIL_EXPANDED_DECISION_SERVICE, STENCIL_INFORMATION_REQUIREMENT, STENCIL_OUTPUT_DECISIONS
-
Fields inherited from interface org.flowable.dmn.editor.constants.EditorJsonConstants
EDITOR_BOUNDS, EDITOR_BOUNDS_LOWER_RIGHT, EDITOR_BOUNDS_UPPER_LEFT, EDITOR_BOUNDS_X, EDITOR_BOUNDS_Y, EDITOR_CHILD_SHAPES, EDITOR_DOCKERS, EDITOR_OUTGOING, EDITOR_SHAPE_ID, EDITOR_SHAPE_PROPERTIES, EDITOR_STENCIL, EDITOR_STENCIL_ID
-
-
Constructor Summary
Constructors Constructor Description DmnJsonConverterUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.node.ObjectNodecreateBoundsNode(double lowerRightX, double lowerRightY, double upperLeftX, double upperLeftY)static com.fasterxml.jackson.databind.node.ObjectNodecreateChildShape(String id, String type, double lowerRightX, double lowerRightY, double upperLeftX, double upperLeftY)static GraphicInfocreateGraphicInfo(double x, double y)static com.fasterxml.jackson.databind.node.ObjectNodecreatePositionNode(double x, double y)static AreacreateRectangle(GraphicInfo graphicInfo)static StringdetermineExpressionType(String expressionValue)static List<com.fasterxml.jackson.databind.JsonNode>filterOutJsonNodes(List<DmnJsonConverterUtil.JsonLookupResult> lookupResults)static StringformatCollectionExpression(String containsOperator, String inputVariable, String expressionValue)protected static StringformatCollectionExpressionValue(String expressionValue)protected static StringgetDMNContainsExpressionMethod(String containsOperator)static List<DmnJsonConverterUtil.JsonLookupResult>getDmnModelChildShapesPropertyValues(com.fasterxml.jackson.databind.JsonNode editorJsonNode, String propertyName, List<String> allowedStencilTypes)static List<DmnJsonConverterUtil.JsonLookupResult>getDmnModelDecisionTableReferences(com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)static StringgetElementId(com.fasterxml.jackson.databind.JsonNode objectNode)static Collection<Point2D>getIntersections(Line2D line, Area shape)static ShapegetLineShape(Line2D line2D)static com.fasterxml.jackson.databind.JsonNodegetProperty(String name, com.fasterxml.jackson.databind.JsonNode objectNode)static StringgetPropertyValueAsString(String name, com.fasterxml.jackson.databind.JsonNode objectNode)static StringgetStencilId(com.fasterxml.jackson.databind.JsonNode objectNode)static StringgetUniqueElementId()static StringgetUniqueElementId(String prefix)static StringgetValueAsString(String name, com.fasterxml.jackson.databind.JsonNode objectNode)protected static voidinternalGetDmnChildShapePropertyValues(com.fasterxml.jackson.databind.JsonNode editorJsonNode, String propertyName, List<String> allowedStencilTypes, List<DmnJsonConverterUtil.JsonLookupResult> result)static booleanisCollectionOperator(String operator)static booleanisDRD(com.fasterxml.jackson.databind.JsonNode definitionNode)static booleanmigrateModel(com.fasterxml.jackson.databind.JsonNode decisionTableNode, com.fasterxml.jackson.databind.ObjectMapper objectMapper)static booleanmigrateModelV3(com.fasterxml.jackson.databind.JsonNode decisionTableNode, com.fasterxml.jackson.databind.ObjectMapper objectMapper)protected static List<String>split(String str)protected static StringtransformCollectionOperation(String operatorValue, String inputType)static voidupdateDecisionTableModelReferences(com.fasterxml.jackson.databind.node.ObjectNode decisionServiceObjectNode, DmnJsonConverterContext converterContext)
-
-
-
Method Detail
-
getValueAsString
public static String getValueAsString(String name, com.fasterxml.jackson.databind.JsonNode objectNode)
-
migrateModel
public static boolean migrateModel(com.fasterxml.jackson.databind.JsonNode decisionTableNode, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
migrateModelV3
public static boolean migrateModelV3(com.fasterxml.jackson.databind.JsonNode decisionTableNode, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
formatCollectionExpression
public static String formatCollectionExpression(String containsOperator, String inputVariable, String expressionValue)
-
isCollectionOperator
public static boolean isCollectionOperator(String operator)
-
isDRD
public static boolean isDRD(com.fasterxml.jackson.databind.JsonNode definitionNode)
-
getStencilId
public static String getStencilId(com.fasterxml.jackson.databind.JsonNode objectNode)
-
getElementId
public static String getElementId(com.fasterxml.jackson.databind.JsonNode objectNode)
-
getUniqueElementId
public static String getUniqueElementId()
-
getPropertyValueAsString
public static String getPropertyValueAsString(String name, com.fasterxml.jackson.databind.JsonNode objectNode)
-
getProperty
public static com.fasterxml.jackson.databind.JsonNode getProperty(String name, com.fasterxml.jackson.databind.JsonNode objectNode)
-
createChildShape
public static com.fasterxml.jackson.databind.node.ObjectNode createChildShape(String id, String type, double lowerRightX, double lowerRightY, double upperLeftX, double upperLeftY)
-
createBoundsNode
public static com.fasterxml.jackson.databind.node.ObjectNode createBoundsNode(double lowerRightX, double lowerRightY, double upperLeftX, double upperLeftY)
-
createPositionNode
public static com.fasterxml.jackson.databind.node.ObjectNode createPositionNode(double x, double y)
-
createRectangle
public static Area createRectangle(GraphicInfo graphicInfo)
-
createGraphicInfo
public static GraphicInfo createGraphicInfo(double x, double y)
-
getIntersections
public static Collection<Point2D> getIntersections(Line2D line, Area shape)
-
getDmnModelChildShapesPropertyValues
public static List<DmnJsonConverterUtil.JsonLookupResult> getDmnModelChildShapesPropertyValues(com.fasterxml.jackson.databind.JsonNode editorJsonNode, String propertyName, List<String> allowedStencilTypes)
-
filterOutJsonNodes
public static List<com.fasterxml.jackson.databind.JsonNode> filterOutJsonNodes(List<DmnJsonConverterUtil.JsonLookupResult> lookupResults)
-
getDmnModelDecisionTableReferences
public static List<DmnJsonConverterUtil.JsonLookupResult> getDmnModelDecisionTableReferences(com.fasterxml.jackson.databind.node.ObjectNode editorJsonNode)
-
updateDecisionTableModelReferences
public static void updateDecisionTableModelReferences(com.fasterxml.jackson.databind.node.ObjectNode decisionServiceObjectNode, DmnJsonConverterContext converterContext)
-
internalGetDmnChildShapePropertyValues
protected static void internalGetDmnChildShapePropertyValues(com.fasterxml.jackson.databind.JsonNode editorJsonNode, String propertyName, List<String> allowedStencilTypes, List<DmnJsonConverterUtil.JsonLookupResult> result)
-
getDMNContainsExpressionMethod
protected static String getDMNContainsExpressionMethod(String containsOperator)
-
formatCollectionExpressionValue
protected static String formatCollectionExpressionValue(String expressionValue)
-
-