@Override
    public List<DocumentType> getVisibleTypes() {
        // Get the master tree model.
        final UnmodifiableTreeModel masterTreeModel = explorerTreeModel.getModel();

        // Filter the model by user permissions.
        final Set<DocumentPermission> requiredPermissions = new HashSet<>();
        requiredPermissions.add(DocumentPermission.VIEW);

        final Set<String> visibleTypes = new HashSet<>();
        addTypes(null, masterTreeModel, visibleTypes, requiredPermissions);

        return getDocumentTypes(visibleTypes);
    }
Create a map of folders and their child items.
stroom-explorer/stroom-explorer-impl/src/main/java/stroom/explorer/impl/ExplorerServiceImpl.java