// Event Action for Job Profile Dynamic content PUBLISH event
        private static void Dynamic_Content_Updated_Action(IDynamicContentUpdatedEvent updatedEventInfo)
        {
            var autofacLifetimeScope = AutofacDependencyResolver.Current.RequestLifetimeScope;
            var dataEventHandler     = autofacLifetimeScope.Resolve <DataEventProcessor>();

            dataEventHandler.PublishDynamicContent(updatedEventInfo.Item);
        }
Example #2
0
 private static void IDynamicContentUpdatedEvent(IDynamicContentUpdatedEvent eventInfo)
 {
     if (eventInfo.Item.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live)
     {
         if (eventInfo.Item.GetType() == HogwartsConstants.activityType)
         {
             // An activity was modified. Purge the cache for whichever house it belongs to
             CacheDependency.Notify(new List <CacheDependencyKey>()
             {
                 new CacheDependencyKey()
                 {
                     Key = eventInfo.Item.SystemParentId.ToString(), Type = HogwartsConstants.houseType
                 }
             });
         }
         else if (eventInfo.Item.GetType() == HogwartsConstants.houseType)
         {
             // House has been edited. Purge it's cache (so new title or logo loads in)
             CacheDependency.Notify(new List <CacheDependencyKey>()
             {
                 new CacheDependencyKey()
                 {
                     Key = eventInfo.Item.Id.ToString(), Type = HogwartsConstants.houseType
                 }
             });
         }
     }
 }
Example #3
0
        private void DynamicContentUpdatedEventHandler(IDynamicContentUpdatedEvent evt)
        {
            var item     = evt.Item;
            var itemType = item.GetType();
            var url      = System.Web.HttpContext.Current.Request.Url.Host;
            var helper   = new IAFCHandBookHelper(url);

            if (itemType == helper.ResourceType ||
                itemType == helper.ExternalResourcesType)
            {
                if (item.Status == ContentLifecycleStatus.Live && item.Visible)
                {
                    if (helper.IsResourceContainedWithinTopicsCategory(item.Id, itemType))
                    {
                        if (helper.IsHandBookResourcesDataExistsFor(item.Id, itemType))
                        {
                            helper.UpdateIAFCHandBookResourcesData(item.Id, itemType);
                        }
                        else
                        {
                            helper.CreateIAFCHandBookResourcesData(item.Id, itemType);
                        }
                    }
                    else
                    {
                        if (helper.IsHandBookResourcesDataExistsFor(item.Id, itemType))
                        {
                            helper.DeleteIAFCHandBookResourcesData(item.Id, itemType);
                        }
                    }
                }
                else if (item.Status == ContentLifecycleStatus.Live && !item.Visible)
                {
                    if (helper.IsHandBookResourcesDataExistsFor(item.Id, itemType))
                    {
                        helper.UbpublishIAFCHandBookResourcesData(item.Id, itemType);
                    }
                }
            }
        }
 /// <summary>
 /// Dynamics the content updated event_ handler.
 /// </summary>
 /// <param name="event">The event.</param>
 private static void DynamicContentUpdatedEvent(IDynamicContentUpdatedEvent eventInfo)
 {
 }
 private void ReportleUpdated(IDynamicContentUpdatedEvent @event)
 {
     DynamicContentViewMasterCustom.permissionsTaxa.Clear();
 }
Example #6
0
 private void ReportleUpdated(IDynamicContentUpdatedEvent @event)
 {
     DynamicContentViewMasterCustom.permissionsTaxa.Clear();
 }