/* Notify about Bookmark getting loaded */
fireBookMarkAboutToLoad(bookmark);
/* Load Conditional Get for the URL */
IConditionalGet conditionalGet = fConditionalGetDAO.load(feedLink);
/* Define Properties for Connection */
Map<Object, Object> properties = new HashMap<Object, Object>();
properties.put(IConnectionPropertyConstants.CON_TIMEOUT, fConnectionTimeout);
/* Add Conditional GET Headers if present */
if (conditionalGet != null) {
String ifModifiedSince = conditionalGet.getIfModifiedSince();
if (ifModifiedSince != null)
properties.put(IConnectionPropertyConstants.IF_MODIFIED_SINCE, ifModifiedSince);
String ifNoneMatch = conditionalGet.getIfNoneMatch();
if (ifNoneMatch != null)
properties.put(IConnectionPropertyConstants.IF_NONE_MATCH, ifNoneMatch);
}
/* Return on Cancelation or shutdown or deletion */
if (!shouldProceedReloading(monitor, bookmark))
return Status.CANCEL_STATUS;
/* Load the Feed */
final Triple<IFeed, IConditionalGet, URI> result = Owl.getConnectionService().reload(feedLink, monitor, properties);
/* Return on Cancelation or shutdown or deletion */
if (!shouldProceedReloading(monitor, bookmark) || result == null)
return Status.CANCEL_STATUS;
/* Remember Homepage of feed */
feedHomepage = result.getFirst().getHomepage();
/* Update ConditionalGet Entity */
boolean conditionalGetIsNull = (conditionalGet == null);
conditionalGet = updateConditionalGet(feedLink, conditionalGet, result.getSecond());
boolean deleteConditionalGet = (!conditionalGetIsNull && conditionalGet == null);
/* Return on Cancelation or shutdown or deletion */
if (!shouldProceedReloading(monitor, bookmark))
return Status.CANCEL_STATUS;
/* Load the Favicon directly afterwards if required */
if (!InternalOwl.PERF_TESTING && OwlUI.getFavicon(bookmark) == null)
loadFavicon(bookmark, monitor, result.getThird(), feedHomepage);
/* Return on Cancelation or shutdown or deletion */
if (!shouldProceedReloading(monitor, bookmark))
return Status.CANCEL_STATUS;
/* Merge and Save Feed */
if (!InternalOwl.TESTING) {
final IConditionalGet finalConditionalGet = conditionalGet;
final boolean finalDeleteConditionalGet = deleteConditionalGet;
fSaveFeedQueue.schedule(new TaskAdapter() {
public IStatus run(IProgressMonitor otherMonitor) {
/* Return on Cancelation or shutdown or deletion */