/**
* @see org.olat.modules.webFeed.managers.FeedManager#getFeedArchive(org.olat.core.id.OLATResourceable)
*/
public VFSLeaf getFeedArchive(final OLATResourceable resource) {
final VFSContainer rootContainer, feedContainer;
rootContainer = getResourceContainer(resource);
feedContainer = getFeedContainer(resource);
//prepare fallback for author if needed
final Feed feed = getFeedLigth(resource, true);
if(feed.isInternal()) {
CoordinatorManager.getCoordinator().getSyncer().doInSync(feed, new SyncerCallback<Boolean>() {
public Boolean execute() {
for(Item item : getItems(feed)) {
if(!item.isAuthorFallbackSet()) {
//get used authorKey first
String author = item.getAuthor();
if(StringHelper.containsNonWhitespace(author)) {
//set author fallback
item.setAuthor(author);
//update item.xml
VFSContainer itemContainer = getItemContainer(item, feed);
if(itemContainer != null) {
VFSLeaf itemFile = (VFSLeaf)itemContainer.resolve(ITEM_FILE_NAME);
XStreamHelper.writeObject(xstream, itemFile, item);
}
}
}
}