Package org.vertx.java.core.json

Examples of org.vertx.java.core.json.JsonArray.addString()


      broadcast.getMutations().add(mutation);
    }
    for (NodeInfoExt node : modifies) {
      System.out.println("mod: " + pathString(node));
      // Edit session wants modifies.
      messageModify.addString(node.getFileEditSessionKey());
      // No broadcast, edit session will handle.
    }
    vertx.eventBus().send("documents.fileSystemEvents", message);
    if (treeDirty) {
      broadcast.setNewTreeVersion(Long.toString(treeVersion));
View Full Code Here


      while (entryIter.hasNext()) {
        Entry<String, FileEditSession> entry = entryIter.next();
        String resourceId = entry.getKey();
        FileEditSession editSession = entry.getValue();
        if (editSession.hasChanges()) {
          resourceIds.addString(resourceId);
        }
      }

      // Resolve the current paths of opened files in case they have been moved.
      eb.send("tree.getCurrentPaths", new JsonObject().putArray("resourceIds", resourceIds),
View Full Code Here

      synchronized (FileTree.this.lock) {
        for (Object id : resourceIds) {
          assert id instanceof String;
          NodeInfoExt node = resourceIdToNode.get(id);
          if (node == null) {
            paths.addString(null);
          } else {
            paths.addString(pathString(node));
          }
        }
      }
View Full Code Here

          assert id instanceof String;
          NodeInfoExt node = resourceIdToNode.get(id);
          if (node == null) {
            paths.addString(null);
          } else {
            paths.addString(pathString(node));
          }
        }
      }
      message.reply(result);
    }
View Full Code Here

      JsonArray resourceIds = new JsonArray();
      result.putArray("resourceIds", resourceIds);
      synchronized (FileTree.this.lock) {
        for (Object path : paths) {
          NodeInfoExt found = findResource(stripSlashes((String) path));
          resourceIds.addString(found == null ? null : found.getFileEditSessionKey());
        }
      }
      message.reply(result);
    }
View Full Code Here

            }

            if (!stackTrace.isEmpty()) {
                JsonArray stack = new JsonArray();
                for (String t : stackTrace) {
                    stack.addString(t);
                }
                jsonError.putArray("stack", stack);
            }
            response.setContentType("application/json", "UTF-8");
            response.end(jsonError.encode());
View Full Code Here

                            file = s.substring(s.lastIndexOf('/') + 1);
                            // skip dot files
                            if (!includeHidden && file.charAt(0) == '.') {
                                continue;
                            }
                            json.addString(file);
                        }

                        request.response().end(json);
                    } else {
                        String file;
View Full Code Here

                }
                if (parameter.enumeration().length > 0) {
                    JsonArray enumeration = new JsonArray();
                    response.putArray("enum", enumeration);
                    for (String item : parameter.enumeration()) {
                        enumeration.addString(item);
                    }
                }
                break;
            case BOOLEAN:
                response.putString("type", type.type());
View Full Code Here

        List<String> seeds = configurator.getSeeds();
        JsonArray arr = new JsonArray();
        json.putArray("seeds", arr);
        if (seeds != null) {
            for (String seed : seeds) {
                arr.addString(seed);
            }
        }

        Policies policies = configuration.getPolicies();
        JsonObject policiesJson = new JsonObject();
View Full Code Here

        List<String> seeds = configurator.getSeeds();
        JsonArray arr = new JsonArray();
        json.putArray("seeds", arr);
        if (seeds != null) {
            for (String seed : seeds) {
                arr.addString(seed);
            }
        }

        Policies policies = configuration.getPolicies();
        JsonObject policiesJson = new JsonObject();
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.