Collection<String> friendlyUrls = repositoryItem.getFriendlyURLs();
if (friendlyUrls != null) {
// Add or update the item so it can be found using later using any friendly URL
for (String friendly : friendlyUrls) {
if (friendly != null) {
IRepositoryItem existingItem = repositoryItems.get(friendly);
// Add the item if it does not exist already, or update it if the version is newer
// than the existing item.
if (existingItem == null || repositoryItem.compareTo(existingItem) > 0) {
repositoryItems.put(friendly, repositoryItem);
}