public static DocumentsListReader createDocumentsListReader(CoreSession session, Collection<DocumentRef> docRefsList) { List<DocumentModel> list = new ArrayList<DocumentModel>(); for (DocumentRef docRef : docRefsList) { DocumentModel doc = session.getDocument(docRef); list.add(doc); } return new DocumentsListReader(session, list); }
pipe.setWriter(writer); if (!recurse) { reader = DocumentsListReader.createDocumentsListReader(coreSession, sources); pipe.setReader(reader); return pipe.run();