public static SelectionSpec[] buildFullTraversal() {
        List<TraversalSpec> tSpecs = buildFullTraversalV2NoFolder();

        // Recurse through the folders
        TraversalSpec visitFolders = createTraversalSpec("visitFolders",
            "Folder", "childEntity",
            new String[]{"visitFolders", "dcToHf", "dcToVmf", "crToH", "crToRp", "HToVm", "rpToVm"});

        SelectionSpec[] sSpecs = new SelectionSpec[tSpecs.size() + 1];
        sSpecs[0] = visitFolders;
        for (int i = 1; i < sSpecs.length; i++) {
            sSpecs[i] = tSpecs.get(i - 1);
        }

        return sSpecs;
    }
public static SelectionSpec [ ] buildFullTraversal ( ) { List < TraversalSpec > tSpecs = buildFullTraversalV2NoFolder ( ) ; TraversalSpec visitFolders = createTraversalSpec ( "visitFolders" , "Folder" , "childEntity" , new String [ ] { "visitFolders" , "dcToHf" , "dcToVmf" , "crToH" , "crToRp" , "HToVm" , "rpToVm" } ) ; SelectionSpec [ ] sSpecs = new SelectionSpec [ tSpecs . size ( ) + 1 ] ; sSpecs [ 0 ] = visitFolders ; for ( int i = 1 ; i < sSpecs . length ; i ++ ) { sSpecs [ i ] = tSpecs . get ( i - 1 ) ; } return sSpecs ; }
This method creates a SelectionSpec[] to traverses the entire
inventory tree starting at a Folder
NOTE: This full traversal is based on VC2/ESX3 inventory structure.
It does not search new ManagedEntities like Network, DVS, etc.
If you want a full traversal with VC4/ESX4, use buildFullTraversalV4().

@return The SelectionSpec[]