Package org.codehaus.jackson

Examples of org.codehaus.jackson.JsonNode.asText()


      for (JsonNode childNode : childShapesNode) {
        ArrayNode outgoingNode = (ArrayNode) childNode.get("outgoing");
        if (outgoingNode != null && outgoingNode.size() > 0) {
          for (JsonNode outgoingChildNode : outgoingNode) {
            JsonNode resourceNode = outgoingChildNode.get(EDITOR_SHAPE_ID);
            if (resourceNode != null&& flowId.equals(resourceNode.asText())) {
              sourceRef = BpmnJsonConverterUtil.getElementId(childNode);
              break;
            }
          }
          if (sourceRef != null) {
View Full Code Here


public class JsonConverterUtil implements EditorJsonConstants, StencilConstants {
 
  public static String getPropertyValueAsString(String name, JsonNode objectNode) {
    String propertyValue = null;
    JsonNode propertyNode = getProperty(name, objectNode);
    if (propertyNode != null && "null".equalsIgnoreCase(propertyNode.asText()) == false) {
      propertyValue = propertyNode.asText();
    }
    return propertyValue;
  }
 
View Full Code Here

 
  public static String getPropertyValueAsString(String name, JsonNode objectNode) {
    String propertyValue = null;
    JsonNode propertyNode = getProperty(name, objectNode);
    if (propertyNode != null && "null".equalsIgnoreCase(propertyNode.asText()) == false) {
      propertyValue = propertyNode.asText();
    }
    return propertyValue;
  }
 
  public static boolean getPropertyValueAsBoolean(String name, JsonNode objectNode) {
View Full Code Here

  }
 
  public static List<String> getPropertyValueAsList(String name, JsonNode objectNode) {
    List<String> resultList = new ArrayList<String>();
    JsonNode propertyNode = getProperty(name, objectNode);
    if (propertyNode != null && "null".equalsIgnoreCase(propertyNode.asText()) == false) {
      String propertyValue = propertyNode.asText();
      String[] valueList = propertyValue.split(",");
      for (String value : valueList) {
        resultList.add(value.trim());
      }
View Full Code Here

 
  public static List<String> getPropertyValueAsList(String name, JsonNode objectNode) {
    List<String> resultList = new ArrayList<String>();
    JsonNode propertyNode = getProperty(name, objectNode);
    if (propertyNode != null && "null".equalsIgnoreCase(propertyNode.asText()) == false) {
      String propertyValue = propertyNode.asText();
      String[] valueList = propertyValue.split(",");
      for (String value : valueList) {
        resultList.add(value.trim());
      }
    }
View Full Code Here

      for (JsonNode childNode : childShapesNode) {
        ArrayNode outgoingNode = (ArrayNode) childNode.get("outgoing");
        if (outgoingNode != null && outgoingNode.size() > 0) {
          for (JsonNode outgoingChildNode : outgoingNode) {
            JsonNode resourceNode = outgoingChildNode.get(EDITOR_SHAPE_ID);
            if (resourceNode != null && boundaryEventId.equals(resourceNode.asText())) {
              attachedRefId = BpmnJsonConverterUtil.getElementId(childNode);
              break;
            }
          }
         
View Full Code Here

      //任务优先级
      JsonNode taskPriorityNode = getProperty(PROPERTY_PRIORITY, elementNode);
      if(taskPriorityNode != null){
        TaskPriority taskPriority = FixFlowFactory.eINSTANCE.createTaskPriority();
        Expression taskPriorityExpression = FixFlowFactory.eINSTANCE.createExpression();
        taskPriorityExpression.setName(taskPriorityNode.asText());
        taskPriorityExpression.setValue(taskPriorityNode.asText());
        taskPriority.setExpression(taskPriorityExpression);
        BpmnModelUtil.addExtensionElement(task, FixFlowPackage.Literals.DOCUMENT_ROOT__TASK_PRIORITY, taskPriority);
      }
     
View Full Code Here

      JsonNode taskPriorityNode = getProperty(PROPERTY_PRIORITY, elementNode);
      if(taskPriorityNode != null){
        TaskPriority taskPriority = FixFlowFactory.eINSTANCE.createTaskPriority();
        Expression taskPriorityExpression = FixFlowFactory.eINSTANCE.createExpression();
        taskPriorityExpression.setName(taskPriorityNode.asText());
        taskPriorityExpression.setValue(taskPriorityNode.asText());
        taskPriority.setExpression(taskPriorityExpression);
        BpmnModelUtil.addExtensionElement(task, FixFlowPackage.Literals.DOCUMENT_ROOT__TASK_PRIORITY, taskPriority);
      }
     
      //任务命令
View Full Code Here

        }
      }
     
      //默认表单
      JsonNode usertaskFormUri = JsonConverterUtil.getProperty(PROPERTY_FORMURI, elementNode);
      if(usertaskFormUri != null && StringUtil.isNotEmpty(usertaskFormUri.asText())){
        FormUri formUri = FixFlowFactory.eINSTANCE.createFormUri();
        Expression expression = FixFlowFactory.eINSTANCE.createExpression();
        expression.setName(usertaskFormUri.asText());
        expression.setValue(usertaskFormUri.asText());
        formUri.setExpression(expression);
View Full Code Here

      //默认表单
      JsonNode usertaskFormUri = JsonConverterUtil.getProperty(PROPERTY_FORMURI, elementNode);
      if(usertaskFormUri != null && StringUtil.isNotEmpty(usertaskFormUri.asText())){
        FormUri formUri = FixFlowFactory.eINSTANCE.createFormUri();
        Expression expression = FixFlowFactory.eINSTANCE.createExpression();
        expression.setName(usertaskFormUri.asText());
        expression.setValue(usertaskFormUri.asText());
        formUri.setExpression(expression);
        BpmnModelUtil.addExtensionElement(task, FixFlowPackage.Literals.DOCUMENT_ROOT__FORM_URI, formUri);
      }
      //浏览表单
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.