private void processNode(TreeNode<Resource> node, String href) {
    Resource r = node.getObject();
    if (r != null) {
      List<ResourceDefinition.PostProcessor> listProcessors =
          m_mapPostProcessors.get(r.getType());
      for (ResourceDefinition.PostProcessor processor : listProcessors) {
        processor.process(m_request, node, href);
      }
      href = node.getStringProperty("href");
      int i = href.indexOf('?');
      if (i != -1) {
        try {
          href = URLDecoder.decode(href.substring(0, i), "UTF-8");
        } catch (UnsupportedEncodingException e) {
          throw new RuntimeException("Unable to decode URI: " + e, e);
        }
      }
    } else {
      String isItemsCollection = node.getStringProperty("isCollection");
      if (node.getName() == null && "true".equals(isItemsCollection)) {
        node.setName("items");
        node.setProperty("href", href);
      }
    }
    for (TreeNode<Resource> child : node.getChildren()) {
      processNode(child, href);
    }

    finalizeNode(node);
  }
Process a node of the result tree.  Recursively calls child nodes.

@param node the node to process
@param href the current href
ambari-server/src/main/java/org/apache/ambari/server/api/services/ResultPostProcessorImpl.java