private void ReIndexForMedia(IMedia sender, bool isPublished) { var actions = DeferedActions.Get(_scopeProvider); if (actions != null) { actions.Add(new DeferedReIndexForMedia(this, sender, isPublished)); } else { DeferedReIndexForMedia.Execute(this, sender, isPublished); } }
/// <summary> /// Remove items from an index /// </summary> /// <param name="entityId"></param> /// <param name="keepIfUnpublished"> /// If true, indicates that we will only delete this item from indexes that don't support unpublished content. /// If false it will delete this from all indexes regardless. /// </param> private void DeleteIndexForEntity(int entityId, bool keepIfUnpublished) { var actions = DeferedActions.Get(_scopeProvider); if (actions != null) { actions.Add(new DeferedDeleteIndex(this, entityId, keepIfUnpublished)); } else { DeferedDeleteIndex.Execute(this, entityId, keepIfUnpublished); } }
/// <summary> /// Re-indexes a content item whether published or not but only indexes them for indexes supporting unpublished content /// </summary> /// <param name="sender"></param> /// <param name="isContentPublished"> /// Value indicating whether the item is published or not /// </param> private static void ReIndexForContent(IContent sender, bool isContentPublished) { var actions = DeferedActions.Get(ApplicationContext.Current.ScopeProvider); if (actions != null) { actions.Add(new DeferedReIndexForContent(sender, isContentPublished)); } else { DeferedReIndexForContent.Execute(sender, isContentPublished); } }
private void ReIndexForMember(IMember member) { var actions = DeferedActions.Get(_scopeProvider); if (actions != null) { actions.Add(new DeferedReIndexForMember(this, member)); } else { DeferedReIndexForMember.Execute(this, member); } }
/// <summary> /// Remove items from any index that doesn't support unpublished content /// </summary> /// <param name="entityId"></param> /// <param name="keepIfUnpublished"> /// If true, indicates that we will only delete this item from indexes that don't support unpublished content. /// If false it will delete this from all indexes regardless. /// </param> private static void DeleteIndexForEntity(int entityId, bool keepIfUnpublished) { var actions = DeferedActions.Get(ApplicationContext.Current.ScopeProvider); if (actions != null) { actions.Add(new DeferedDeleteIndex(entityId, keepIfUnpublished)); } else { DeferedDeleteIndex.Execute(entityId, keepIfUnpublished); } }
private static void ReIndexForMember(IMember member) { var actions = DeferedActions.Get(ApplicationContext.Current.ScopeProvider); if (actions != null) { actions.Add(new DeferedReIndexForMember(member)); } else { DeferedReIndexForMember.Execute(member); } }
/// <inheritdoc /> public void ReIndexForMember(IMember member) { var actions = DeferedActions.Get(_scopeProvider); if (actions != null) { actions.Add(new DeferedReIndexForMember(_backgroundTaskQueue, this, member)); } else { DeferedReIndexForMember.Execute(_backgroundTaskQueue, this, member); } }
/// <inheritdoc /> public void ReIndexForMedia(IMedia sender, bool isPublished) { var actions = DeferedActions.Get(_scopeProvider); if (actions != null) { actions.Add(new DeferedReIndexForMedia(_backgroundTaskQueue, this, sender, isPublished)); } else { DeferedReIndexForMedia.Execute(_backgroundTaskQueue, this, sender, isPublished); } }
/// <inheritdoc /> public void DeleteIndexForEntities(IReadOnlyCollection <int> entityIds, bool keepIfUnpublished) { var actions = DeferedActions.Get(_scopeProvider); if (actions != null) { actions.Add(new DeferedDeleteIndex(this, entityIds, keepIfUnpublished)); } else { DeferedDeleteIndex.Execute(this, entityIds, keepIfUnpublished); } }