Examples of createObjectNode()


Examples of com.fasterxml.jackson.databind.ObjectMapper.createObjectNode()

    private static final Logger LOG = LoggerFactory.getLogger(Ping.class);

    public static void ping(AsyncHttpClient client, URI server, URI ourUri, String radioId) throws IOException, ExecutionException, InterruptedException {
        ObjectMapper mapper = new ObjectMapper();

        ObjectNode rootNode = mapper.createObjectNode();
        rootNode.put("rest_transport_address", ourUri.toString());

        final UriBuilder uriBuilder = UriBuilder.fromUri(server);
        uriBuilder.path("/system/radios/" + radioId + "/ping");
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.createObjectNode()

    }

    private JsonNode getProcessDefinitionResponse(
            ProcessDefinitionEntity processDefinition) {
        ObjectMapper mapper = new ObjectMapper();
        ObjectNode pdrJSON = mapper.createObjectNode();
        pdrJSON.put("id", processDefinition.getId());
        pdrJSON.put("name", processDefinition.getName());
        pdrJSON.put("key", processDefinition.getKey());
        pdrJSON.put("version", processDefinition.getVersion());
        pdrJSON.put("deploymentId", processDefinition.getDeploymentId());
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.createObjectNode()

        public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
                                            Authentication authentication) throws ServletException, IOException {
            try {
                String token = headerUtil.createAuthToken(((User) authentication.getPrincipal()).getUsername());
                ObjectMapper mapper = new ObjectMapper();
                ObjectNode node = mapper.createObjectNode().put("token", token);
                PrintWriter out = response.getWriter();
                out.print(node.toString());
                out.flush();
                out.close();
            } catch (GeneralSecurityException e) {
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.createObjectNode()

    public void canRunCodeTransactionally(){
        running(fakeApplication(),()->{
            try {
                ObjectMapper mapper = Json.mapper();
                String operation = "normal";
                ObjectNode node =mapper.createObjectNode();
                node.put("collection",TEST_COLLECTION);
                node.put("op",operation);

                FakeRequest req = new FakeRequest(POST,"/plugin/"+TEST_TRANSACT);
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.createObjectNode()

  static ObjectNode getDashboardForElasticsearch(String dashboardPath) throws IOException {
    final ObjectMapper mapper = JsonUtils.getMapper();
    final InputStream dashboardStram = RestClient.class.getClassLoader().getResourceAsStream(dashboardPath);
    final ObjectNode dashboard = (ObjectNode) mapper.readTree(dashboardStram);
    dashboard.put(TITLE, dashboard.get(TITLE).asText() + STAGEMONITOR_MAJOR_MINOR_VERSION);
    ObjectNode dashboardElasticsearchFormat = mapper.createObjectNode();
    dashboardElasticsearchFormat.put("user", "guest");
    dashboardElasticsearchFormat.put("group", "guest");
    dashboardElasticsearchFormat.set(TITLE, dashboard.get(TITLE));
    dashboardElasticsearchFormat.set("tags", dashboard.get("tags"));
    dashboardElasticsearchFormat.put("dashboard", dashboard.toString());
View Full Code Here

Examples of org.codehaus.jackson.map.ObjectMapper.createObjectNode()

    String basemap = rootNode.path("basemap").getTextValue();
    String bbox = rootNode.path("extent").getTextValue();
    String username = rootNode.path("username").getTextValue();
    String password = rootNode.path("password").getTextValue();
   
    ObjectNode responseJson = mapper.createObjectNode();
    //response json format
    //{"status": "", "message": "", mapUrl: "", "layers": []}
    //status  where in the process
    //statusMessage text
    //mapUrl:
View Full Code Here

Examples of org.codehaus.jackson.map.ObjectMapper.createObjectNode()

    public ObjectNode toJson() {

  ObjectMapper om = new ObjectMapper();

  ObjectNode root = om.createObjectNode();

  root.put(JSON_ID, getIdentifier());
  root.put(JSON_IS_MULTIPLE, isMultiple());
  root.put(JSON_COMP_REF_NAME, getComponent().getName());
  root.put(JSON_PROVIDER_URL, providerURL);
View Full Code Here

Examples of org.codehaus.jackson.map.ObjectMapper.createObjectNode()

  root.put(JSON_ID, getIdentifier());
  root.put(JSON_IS_MULTIPLE, isMultiple());
  root.put(JSON_COMP_REF_NAME, getComponent().getName());
  root.put(JSON_PROVIDER_URL, providerURL);

  ObjectNode json_rr = om.createObjectNode();

  json_rr.put(JSON_RESOLVABLE_REF_NAME, getTarget().getName());

  // Set RRTYPE
  if (getTarget() instanceof InterfaceReference) {
View Full Code Here

Examples of org.codehaus.jackson.map.ObjectMapper.createObjectNode()

    private String toJson(EndpointRegistration registration)
      throws JsonGenerationException, JsonMappingException, IOException {

  ObjectMapper root = new ObjectMapper();

  ObjectNode node = root.createObjectNode();

  ObjectNode nodeendpoint = root.createObjectNode();

  for (Map.Entry<String, String> entry : registration.getEndpoint()
    .entrySet()) {
View Full Code Here

Examples of org.codehaus.jackson.map.ObjectMapper.createObjectNode()

  ObjectMapper root = new ObjectMapper();

  ObjectNode node = root.createObjectNode();

  ObjectNode nodeendpoint = root.createObjectNode();

  for (Map.Entry<String, String> entry : registration.getEndpoint()
    .entrySet()) {
      nodeendpoint.put(entry.getKey(), entry.getValue());
  }
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.