@Override protected void afterUpdate(final TeamCalDO obj, final TeamCalDO dbObj) { super.afterUpdate(obj, dbObj); if (obj != null && dbObj != null && obj.isExternalSubscription() == true && StringUtils.equals(obj.getExternalSubscriptionUrl(), dbObj.getExternalSubscriptionUrl()) == false) { // only update if the url has changed! getTeamEventExternalSubscriptionCache().updateCache(obj); } // if calendar is present in subscription cache and is not an external subscription anymore -> cleanup! if (obj != null && obj.isExternalSubscription() == false && getTeamEventExternalSubscriptionCache().isExternalSubscribedCalendar(obj.getId())) { obj.setExternalSubscriptionCalendarBinary(null); obj.setExternalSubscriptionUrl(null); obj.setExternalSubscriptionUpdateInterval(null); obj.setExternalSubscriptionHash(null); getTeamEventExternalSubscriptionCache().updateCache(obj, true); } }
currentInitializedHash = null; lastUpdated = null; String url = teamCalDO.getExternalSubscriptionUrl(); if (teamCalDO.isExternalSubscription() == false || StringUtils.isEmpty(url)) {