use of org.apache.jackrabbit.jcr2spi.LazyItemIterator in project jackrabbit by apache.
the class VersionHistoryImpl method getAllVersions.
/**
* @see VersionHistory#getAllVersions()
*/
public VersionIterator getAllVersions() throws RepositoryException {
checkStatus();
refreshEntry(vhEntry);
Iterator<NodeEntry> childIter = vhEntry.getNodeEntries();
List<NodeEntry> versionEntries = new ArrayList<NodeEntry>();
// all child-nodes except from jcr:versionLabels point to Versions.
while (childIter.hasNext()) {
NodeEntry entry = childIter.next();
if (!NameConstants.JCR_VERSIONLABELS.equals(entry.getName())) {
versionEntries.add(entry);
}
}
return new LazyItemIterator(getItemManager(), new RangeIteratorAdapter(versionEntries));
}
Aggregations