View Source
Class ElementService
Assembly: Umbraco.Core.dll
Syntax
public class ElementService : PublishableContentServiceBase<IElement>, IElementService, IPublishableContentService<IElement>, IContentServiceBase<IElement>, IContentServiceBase, IService
Constructors
View Source
ElementService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IAuditService, IContentTypeRepository, IElementRepository, ILanguageRepository, Lazy<IPropertyValidationService>, ICultureImpactFactory, IUserIdKeyResolver, PropertyEditorCollection, IIdKeyMap, IShortStringHelper)
Declaration
public ElementService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IAuditService auditService, IContentTypeRepository contentTypeRepository, IElementRepository elementRepository, ILanguageRepository languageRepository, Lazy<IPropertyValidationService> propertyValidationService, ICultureImpactFactory cultureImpactFactory, IUserIdKeyResolver userIdKeyResolver, PropertyEditorCollection propertyEditorCollection, IIdKeyMap idKeyMap, IShortStringHelper shortStringHelper)
Parameters
Properties
View Source
ContentObjectType
Declaration
protected override UmbracoObjectTypes ContentObjectType { get; }
Property Value
View Source
Logger
Declaration
protected override ILogger<ElementService> Logger { get; }
Property Value
View Source
ReadLockIds
Declaration
protected override int[] ReadLockIds { get; }
Property Value
View Source
SupportsBranchPublishing
Declaration
protected override bool SupportsBranchPublishing { get; }
Property Value
View Source
WriteLockIds
Declaration
protected override int[] WriteLockIds { get; }
Property Value
Methods
View Source
CheckDataIntegrity(ContentDataIntegrityReportOptions)
Checks the data integrity of the content tree and optionally fixes issues.
Declaration
public override ContentDataIntegrityReport CheckDataIntegrity(ContentDataIntegrityReportOptions options)
Parameters
Returns
View Source
DeleteLocked(ICoreScope, IElement, EventMessages)
Declaration
protected override void DeleteLocked(ICoreScope scope, IElement content, EventMessages evtMsgs)
Parameters
View Source
DeleteOfTypes(IEnumerable<int>, int)
Deletes all content of given types.
Declaration
public override void DeleteOfTypes(IEnumerable<int> contentTypeIds, int userId = -1)
Parameters
| Type |
Name |
Description |
| IEnumerable<int> |
contentTypeIds |
The content type identifiers.
|
| int |
userId |
The identifier of the user performing the action.
|
View Source
DeletingNotification(IElement, EventMessages)
Declaration
protected override DeletingNotification<IElement> DeletingNotification(IElement content, EventMessages eventMessages)
Parameters
Returns
View Source
PublishedNotification(IEnumerable<IElement>, EventMessages)
Declaration
protected override IStatefulNotification PublishedNotification(IEnumerable<IElement> content, EventMessages eventMessages)
Parameters
Returns
View Source
PublishedNotification(IElement, EventMessages)
Declaration
protected override IStatefulNotification PublishedNotification(IElement content, EventMessages eventMessages)
Parameters
Returns
View Source
PublishedNotification(IElement, EventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>?, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>?)
Creates the "published" notification for a single item, carrying the cultures that were published and
unpublished by the operation.
Declaration
protected override IStatefulNotification PublishedNotification(IElement content, EventMessages eventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>? publishedCultures, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>? unpublishedCultures)
Parameters
| Type |
Name |
Description |
| IElement |
content |
The item that was published.
|
| EventMessages |
eventMessages |
The event messages collection.
|
| IReadOnlyDictionary<Guid, IReadOnlyCollection<string>> |
publishedCultures |
The cultures that were published, keyed by item key, or null if not tracked.
|
| IReadOnlyDictionary<Guid, IReadOnlyCollection<string>> |
unpublishedCultures |
The cultures that were unpublished as part of the publish, keyed by item key, or null if not applicable.
|
Returns
View Source
PublishingNotification(IElement, EventMessages)
Declaration
protected override CancelableEnumerableObjectNotification<IElement> PublishingNotification(IElement content, EventMessages eventMessages)
Parameters
Returns
View Source
RolledBackNotification(IElement, EventMessages)
Declaration
protected override RolledBackNotification<IElement> RolledBackNotification(IElement target, EventMessages messages)
Parameters
Returns
View Source
RollingBackNotification(IElement, EventMessages)
Declaration
protected override RollingBackNotification<IElement> RollingBackNotification(IElement target, EventMessages messages)
Parameters
Returns
View Source
SavedNotification(IEnumerable<IElement>, EventMessages)
Declaration
protected override SavedNotification<IElement> SavedNotification(IEnumerable<IElement> content, EventMessages eventMessages)
Parameters
Returns
View Source
SavedNotification(IEnumerable<IElement>, EventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>?)
Creates the "saved" notification for multiple items, carrying the cultures that were saved per item.
Declaration
protected override SavedNotification<IElement> SavedNotification(IEnumerable<IElement> content, EventMessages eventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>? savedCultures)
Parameters
| Type |
Name |
Description |
| IEnumerable<IElement> |
content |
The items that were saved.
|
| EventMessages |
eventMessages |
The event messages collection.
|
| IReadOnlyDictionary<Guid, IReadOnlyCollection<string>> |
savedCultures |
The cultures that were saved, keyed by item key.
|
Returns
View Source
SavedNotification(IElement, EventMessages)
Declaration
protected override SavedNotification<IElement> SavedNotification(IElement content, EventMessages eventMessages)
Parameters
Returns
View Source
SavedNotification(IElement, EventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>?)
Creates the "saved" notification for a single item, carrying the cultures that were saved.
Declaration
protected override SavedNotification<IElement> SavedNotification(IElement content, EventMessages eventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>? savedCultures)
Parameters
| Type |
Name |
Description |
| IElement |
content |
The item that was saved.
|
| EventMessages |
eventMessages |
The event messages collection.
|
| IReadOnlyDictionary<Guid, IReadOnlyCollection<string>> |
savedCultures |
The cultures that were saved, keyed by item key, or null if not tracked.
|
Returns
View Source
SavingNotification(IEnumerable<IElement>, EventMessages)
Declaration
protected override SavingNotification<IElement> SavingNotification(IEnumerable<IElement> content, EventMessages eventMessages)
Parameters
Returns
View Source
SavingNotification(IElement, EventMessages)
Declaration
protected override SavingNotification<IElement> SavingNotification(IElement content, EventMessages eventMessages)
Parameters
Returns
View Source
TreeChangeNotification(IEnumerable<IElement>, TreeChangeTypes, EventMessages)
Declaration
protected override TreeChangeNotification<IElement> TreeChangeNotification(IEnumerable<IElement> content, TreeChangeTypes changeTypes, EventMessages eventMessages)
Parameters
Returns
View Source
TreeChangeNotification(IElement, TreeChangeTypes, IEnumerable<string>?, IEnumerable<string>?, EventMessages)
Declaration
protected override TreeChangeNotification<IElement> TreeChangeNotification(IElement content, TreeChangeTypes changeTypes, IEnumerable<string>? publishedCultures, IEnumerable<string>? unpublishedCultures, EventMessages eventMessages)
Parameters
Returns
View Source
TreeChangeNotification(IElement, TreeChangeTypes, EventMessages)
Declaration
protected override TreeChangeNotification<IElement> TreeChangeNotification(IElement content, TreeChangeTypes changeTypes, EventMessages eventMessages)
Parameters
Returns
View Source
UnpublishedNotification(IElement, EventMessages)
Declaration
protected override IStatefulNotification UnpublishedNotification(IElement content, EventMessages eventMessages)
Parameters
Returns
View Source
UnpublishedNotification(IElement, EventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>?)
Creates the "unpublished" notification for a single item, carrying the cultures that were unpublished.
Declaration
protected override IStatefulNotification UnpublishedNotification(IElement content, EventMessages eventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>? unpublishedCultures)
Parameters
| Type |
Name |
Description |
| IElement |
content |
The item that was unpublished.
|
| EventMessages |
eventMessages |
The event messages collection.
|
| IReadOnlyDictionary<Guid, IReadOnlyCollection<string>> |
unpublishedCultures |
The cultures that were unpublished, keyed by item key, or null if not tracked.
|
Returns
View Source
UnpublishingNotification(IElement, EventMessages)
Declaration
protected override CancelableEnumerableObjectNotification<IElement> UnpublishingNotification(IElement content, EventMessages eventMessages)
Parameters
Returns