View Source
Class ContentTypeServiceBase<TRepository, TItem, TService>
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public abstract class ContentTypeServiceBase<TRepository, TItem, TService> : ContentTypeServiceBase<TItem, TService>, IContentTypeBaseService<TItem>, IContentTypeBaseService, IService where TRepository : IContentTypeRepositoryBase<TItem> where TItem : class, IContentTypeComposition where TService : class, IContentTypeBaseService<TItem>
Type Parameters
Name |
Description |
TRepository |
|
TItem |
|
TService |
|
Constructors
View Source
ContentTypeServiceBase(IScopeProvider, ILogger, IEventMessagesFactory, TRepository, IAuditRepository, IEntityContainerRepository, IEntityRepository)
Declaration
protected ContentTypeServiceBase(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, TRepository repository, IAuditRepository auditRepository, IEntityContainerRepository containerRepository, IEntityRepository entityRepository)
Parameters
Properties
View Source
ContainedObjectType
Declaration
protected abstract Guid ContainedObjectType { get; }
Property Value
Type |
Description |
System.Guid |
|
View Source
ContainerObjectType
Declaration
protected Guid ContainerObjectType { get; }
Property Value
Type |
Description |
System.Guid |
|
View Source
ReadLockIds
Declaration
protected abstract int[] ReadLockIds { get; }
Property Value
Type |
Description |
System.Int32[] |
|
View Source
Repository
Declaration
protected TRepository Repository { get; }
Property Value
Type |
Description |
TRepository |
|
View Source
WriteLockIds
Declaration
protected abstract int[] WriteLockIds { get; }
Property Value
Type |
Description |
System.Int32[] |
|
Methods
View Source
Copy(TItem, Int32)
Declaration
public Attempt<OperationResult<MoveOperationStatusType, TItem>> Copy(TItem copying, int containerId)
Parameters
Type |
Name |
Description |
TItem |
copying |
|
System.Int32 |
containerId |
|
Returns
View Source
Copy(TItem, String, String, TItem)
Declaration
public TItem Copy(TItem original, string alias, string name, TItem parent)
Parameters
Type |
Name |
Description |
TItem |
original |
|
System.String |
alias |
|
System.String |
name |
|
TItem |
parent |
|
Returns
View Source
Copy(TItem, String, String, Int32)
Declaration
public TItem Copy(TItem original, string alias, string name, int parentId = -1)
Parameters
Type |
Name |
Description |
TItem |
original |
|
System.String |
alias |
|
System.String |
name |
|
System.Int32 |
parentId |
|
Returns
View Source
Count()
Declaration
Returns
Type |
Description |
System.Int32 |
|
View Source
CreateContainer(Int32, String, Int32)
Declaration
public Attempt<OperationResult<OperationResultType, EntityContainer>> CreateContainer(int parentId, string name, int userId = -1)
Parameters
Type |
Name |
Description |
System.Int32 |
parentId |
|
System.String |
name |
|
System.Int32 |
userId |
|
Returns
View Source
Delete(TItem, Int32)
Declaration
public void Delete(TItem item, int userId = -1)
Parameters
Type |
Name |
Description |
TItem |
item |
|
System.Int32 |
userId |
|
View Source
Delete(IEnumerable<TItem>, Int32)
Declaration
public void Delete(IEnumerable<TItem> items, int userId = -1)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<TItem> |
items |
|
System.Int32 |
userId |
|
View Source
DeleteContainer(Int32, Int32)
Declaration
public Attempt<OperationResult> DeleteContainer(int containerId, int userId = -1)
Parameters
Type |
Name |
Description |
System.Int32 |
containerId |
|
System.Int32 |
userId |
|
Returns
View Source
DeleteItemsOfTypes(IEnumerable<Int32>)
Declaration
protected abstract void DeleteItemsOfTypes(IEnumerable<int> typeIds)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Int32> |
typeIds |
|
View Source
Get(Guid)
Declaration
public TItem Get(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
View Source
Get(Int32)
Declaration
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
Get(String)
Declaration
public TItem Get(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
View Source
GetAll(IEnumerable<Guid>)
Declaration
public IEnumerable<TItem> GetAll(IEnumerable<Guid> ids)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Guid> |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TItem> |
|
View Source
GetAll(Int32[])
Declaration
public IEnumerable<TItem> GetAll(params int[] ids)
Parameters
Type |
Name |
Description |
System.Int32[] |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TItem> |
|
View Source
GetChildren(Guid)
Declaration
public IEnumerable<TItem> GetChildren(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TItem> |
|
View Source
GetChildren(Int32)
Declaration
public IEnumerable<TItem> GetChildren(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TItem> |
|
View Source
GetComposedOf(Int32)
Declaration
public IEnumerable<TItem> GetComposedOf(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TItem> |
|
View Source
GetComposedOf(Int32, IEnumerable<TItem>)
Declaration
public IEnumerable<TItem> GetComposedOf(int id, IEnumerable<TItem> all)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Collections.Generic.IEnumerable<TItem> |
all |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TItem> |
|
View Source
GetContainer(Guid)
Declaration
public EntityContainer GetContainer(Guid containerId)
Parameters
Type |
Name |
Description |
System.Guid |
containerId |
|
Returns
View Source
GetContainer(Int32)
Declaration
public EntityContainer GetContainer(int containerId)
Parameters
Type |
Name |
Description |
System.Int32 |
containerId |
|
Returns
View Source
GetContainers(TItem)
Declaration
public IEnumerable<EntityContainer> GetContainers(TItem item)
Parameters
Type |
Name |
Description |
TItem |
item |
|
Returns
View Source
GetContainers(Int32[])
Declaration
public IEnumerable<EntityContainer> GetContainers(int[] containerIds)
Parameters
Type |
Name |
Description |
System.Int32[] |
containerIds |
|
Returns
View Source
GetContainers(String, Int32)
Declaration
public IEnumerable<EntityContainer> GetContainers(string name, int level)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Int32 |
level |
|
Returns
View Source
GetDescendants(Int32, Boolean)
Declaration
public IEnumerable<TItem> GetDescendants(int id, bool andSelf)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Boolean |
andSelf |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TItem> |
|
View Source
HasChildren(Guid)
Declaration
public bool HasChildren(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
HasChildren(Int32)
Declaration
public bool HasChildren(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
HasContainerInPath(Int32[])
Declaration
public bool HasContainerInPath(params int[] ids)
Parameters
Type |
Name |
Description |
System.Int32[] |
ids |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
HasContainerInPath(String)
Given the path of a content item, this will return true if the content item exists underneath a list view content item
Declaration
public bool HasContainerInPath(string contentPath)
Parameters
Type |
Name |
Description |
System.String |
contentPath |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
HasContentNodes(Int32)
Declaration
public bool HasContentNodes(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Move(TItem, Int32)
Declaration
public Attempt<OperationResult<MoveOperationStatusType>> Move(TItem moving, int containerId)
Parameters
Type |
Name |
Description |
TItem |
moving |
|
System.Int32 |
containerId |
|
Returns
View Source
RenameContainer(Int32, String, Int32)
Declaration
public Attempt<OperationResult<OperationResultType, EntityContainer>> RenameContainer(int id, string name, int userId = -1)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.String |
name |
|
System.Int32 |
userId |
|
Returns
View Source
Save(TItem, Int32)
Declaration
public void Save(TItem item, int userId = -1)
Parameters
Type |
Name |
Description |
TItem |
item |
|
System.Int32 |
userId |
|
View Source
Save(IEnumerable<TItem>, Int32)
Declaration
public void Save(IEnumerable<TItem> items, int userId = -1)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<TItem> |
items |
|
System.Int32 |
userId |
|
View Source
SaveContainer(EntityContainer, Int32)
Declaration
public Attempt<OperationResult> SaveContainer(EntityContainer container, int userId = -1)
Parameters
Returns
View Source
ValidateComposition(TItem)
Declaration
public Attempt<string[]> ValidateComposition(TItem compo)
Parameters
Type |
Name |
Description |
TItem |
compo |
|
Returns
Type |
Description |
Attempt<System.String[]> |
|
View Source
ValidateLocked(TItem)
Declaration
protected void ValidateLocked(TItem compositionContentType)
Parameters
Type |
Name |
Description |
TItem |
compositionContentType |
|
Explicit Interface Implementations
View Source
IContentTypeBaseService.Get(Int32)
Declaration
IContentTypeComposition IContentTypeBaseService.Get(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns