throws ItemNotFoundException, RepositoryException {
try {
// Get item info from cache and use it if up to date
Entry<PropertyInfo> cached = cache.getPropertyInfo(propertyId);
ItemInfo info;
if (isUpToDate(cached, entry)) {
info = cached.info;
} else {
// otherwise retrieve item info from service and cache the whole batch
Iterator<? extends ItemInfo> infos = service.getItemInfos(sessionInfo, propertyId);
info = first(infos, cache, entry.getGeneration());
if (info == null || info.denotesNode()) {
throw new ItemNotFoundException("PropertyId: " + propertyId);
}
}
assertMatchingPath(info, entry);