private void checkPermsForMove(final ExplorerNode node,
                                   final PermissionInheritance permissionInheritance) {
        // Even though move is not changing the actual document, it is not right that a user with only VIEW
        // can move a doc and potentially move it into a folder that only they have access to.
        if (!securityContext.hasDocumentPermission(node.getDocRef(), DocumentPermission.EDIT)) {
            throw new PermissionException(securityContext.getUserRef(),
                    "You must have 'Edit' permission on the document to move it.");
        }
        if (ALLOW_PERMISSION_CHANGE.contains(permissionInheritance)) {
            if (!securityContext.hasDocumentPermission(node.getDocRef(), DocumentPermission.OWNER)) {
                throw new PermissionException(securityContext.getUserRef(),
                        "You must have 'Owner' permission on the document to move it with permission mode '"
                        + permissionInheritance.getDisplayValue() + "'.");
            }
        }
    }
Create a map of folders and their child items.
stroom-explorer/stroom-explorer-impl/src/main/java/stroom/explorer/impl/ExplorerServiceImpl.java