Class JsonConverterUtil

java.lang.Object
org.activiti.editor.language.json.converter.util.JsonConverterUtil
All Implemented Interfaces:
EditorJsonConstants, StencilConstants

public class JsonConverterUtil extends Object implements EditorJsonConstants, StencilConstants
  • Constructor Details

    • JsonConverterUtil

      public JsonConverterUtil()
  • Method Details

    • getPropertyValueAsString

      public static String getPropertyValueAsString(String name, com.fasterxml.jackson.databind.JsonNode objectNode)
    • getPropertyValueAsBoolean

      public static boolean getPropertyValueAsBoolean(String name, com.fasterxml.jackson.databind.JsonNode objectNode)
    • getPropertyValueAsBoolean

      public static boolean getPropertyValueAsBoolean(String name, com.fasterxml.jackson.databind.JsonNode objectNode, boolean defaultValue)
    • getPropertyValueAsList

      public static List<String> getPropertyValueAsList(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)
    • getBpmnProcessModelChildShapesPropertyValues

      protected static List<JsonConverterUtil.JsonLookupResult> getBpmnProcessModelChildShapesPropertyValues(com.fasterxml.jackson.databind.JsonNode editorJsonNode, String propertyName, List<String> allowedStencilTypes)
      Usable for BPMN 2.0 editor json: traverses all child shapes (also nested), goes into the properties and sees if there is a matching property in the 'properties' of the childshape and returns those in a list. Returns a map with said json nodes, with the key the name of the childshape.
    • internalGetBpmnProcessChildShapePropertyValues

      protected static void internalGetBpmnProcessChildShapePropertyValues(com.fasterxml.jackson.databind.JsonNode editorJsonNode, String propertyName, List<String> allowedStencilTypes, List<JsonConverterUtil.JsonLookupResult> result)
    • getBpmnProcessModelFormReferences

      public static List<JsonConverterUtil.JsonLookupResult> getBpmnProcessModelFormReferences(com.fasterxml.jackson.databind.JsonNode editorJsonNode)
    • getBpmnProcessModelDecisionTableReferences

      public static List<JsonConverterUtil.JsonLookupResult> getBpmnProcessModelDecisionTableReferences(com.fasterxml.jackson.databind.JsonNode editorJsonNode)
    • getAppModelReferencedProcessModels

      public static List<com.fasterxml.jackson.databind.JsonNode> getAppModelReferencedProcessModels(com.fasterxml.jackson.databind.JsonNode appModelJson)
    • getAppModelReferencedModelIds

      public static Set<String> getAppModelReferencedModelIds(com.fasterxml.jackson.databind.JsonNode appModelJson)
    • gatherLongPropertyFromJsonNodes

      public static Set<Long> gatherLongPropertyFromJsonNodes(Iterable<com.fasterxml.jackson.databind.JsonNode> jsonNodes, String propertyName)
      Loops through a list of JsonNode instances, and stores the given property with given type in the returned list. In Java 8, this probably could be done a lot cooler.
    • gatherStringPropertyFromJsonNodes

      public static Set<String> gatherStringPropertyFromJsonNodes(Iterable<com.fasterxml.jackson.databind.JsonNode> jsonNodes, String propertyName)
    • filterOutJsonNodes

      public static List<com.fasterxml.jackson.databind.JsonNode> filterOutJsonNodes(List<JsonConverterUtil.JsonLookupResult> lookupResults)