code: public void onEachNode( Session session,
                              boolean includeSystemNodes,
                              NodeOperation operation ) throws Exception {
          Node node = session.getRootNode();
          operation.run(node);
          NodeIterator iter = node.getNodes();
          while (iter.hasNext()) {
              Node child = iter.nextNode();
              if (!includeSystemNodes && child.getName().equals("jcr:system")) continue;
              operation.run(child);
              onEachNodeBelow(child, operation);
          }
      }
docs: Execute the supplied operation on each node in the workspace accessible by the supplied session.
  
  @param session the session
  @param includeSystemNodes true if all nodes under "/jcr:system" should be included, or false if the system nodes should be
  excluded
  @param operation the operation
  @throws Exception the exception thrown by the repository or the operation