Changeset 30256
- Timestamp:
- 02/18/08 22:52:11 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
org.nuxeo.ecm.core/branches/1.4/nuxeo-core-io/src/main/java/org/nuxeo/ecm/core/io/impl/plugins/SingleDocumentReader.java
r29029 r30256 37 37 private DocumentModel doc; 38 38 39 private boolean enableRepeatedReads = false; 40 41 private boolean readDone = false; 42 39 43 public SingleDocumentReader(CoreSession session, DocumentModel root) { 40 44 super(session); … … 57 61 public ExportedDocument read() throws IOException { 58 62 if (doc != null) { 59 return new ExportedDocumentImpl(doc); 63 if (readDone && !enableRepeatedReads) { 64 return null; 65 } else { 66 readDone = true; 67 return new ExportedDocumentImpl(doc); 68 } 60 69 } 61 70 doc = null; … … 63 72 } 64 73 74 public void setEnableRepeatedReads(boolean enableRepeatedReads) { 75 this.enableRepeatedReads = enableRepeatedReads; 76 } 77 65 78 }
