ResourceIDImpl resourceID = resourceDAO.getResourceID(versionedPath.getPath());
long snapshotID = versionedPath.getVersion();
CollectionImpl collectionImpl =
resourceVersionDAO.get(resourceID, snapshotID, start, pageLen);
if (collectionImpl == null) {
String msg = "Resource " + versionedPath.getPath() +
" does not have a version " + versionedPath.getVersion();
log.error(msg);
throw new RegistryException(msg);
}
collectionImpl.setDataAccessManager(dataAccessManager);
collectionImpl.setUserName(CurrentSession.getUser());
collectionImpl.setTenantId(CurrentSession.getTenantId());
collectionImpl.setUserRealm(CurrentSession.getUserRealm());
collectionImpl.setPath(versionedPath.getPath());
collectionImpl.setSnapshotID(snapshotID);
collectionImpl.setMatchingSnapshotID(snapshotID);
return collectionImpl;
}