Search Results for

    Show / Hide Table of Contents
    View Source

    Class DataTypeService

    Represents the DataType Service, which is an easy access to operations involving IDataType

    Inheritance
    System.Object
    RepositoryService
    Namespace: Umbraco.Cms.Core.Services.Implement
    Assembly: Umbraco.Core.dll
    Syntax
    public class DataTypeService : RepositoryService, IDataTypeService, IService

    Constructors

    View Source

    DataTypeService(IDataValueEditorFactory, ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IDataTypeRepository, IDataTypeContainerRepository, IAuditRepository, IEntityRepository, IContentTypeRepository, IIOHelper, ILocalizedTextService, ILocalizationService, IShortStringHelper, IJsonSerializer)

    Declaration
    public DataTypeService(IDataValueEditorFactory dataValueEditorFactory, ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IDataTypeRepository dataTypeRepository, IDataTypeContainerRepository dataTypeContainerRepository, IAuditRepository auditRepository, IEntityRepository entityRepository, IContentTypeRepository contentTypeRepository, IIOHelper ioHelper, ILocalizedTextService localizedTextService, ILocalizationService localizationService, IShortStringHelper shortStringHelper, IJsonSerializer jsonSerializer)
    Parameters
    Type Name Description
    IDataValueEditorFactory dataValueEditorFactory
    ICoreScopeProvider provider
    ILoggerFactory loggerFactory
    IEventMessagesFactory eventMessagesFactory
    IDataTypeRepository dataTypeRepository
    IDataTypeContainerRepository dataTypeContainerRepository
    IAuditRepository auditRepository
    IEntityRepository entityRepository
    IContentTypeRepository contentTypeRepository
    IIOHelper ioHelper
    ILocalizedTextService localizedTextService
    ILocalizationService localizationService
    IShortStringHelper shortStringHelper
    IJsonSerializer jsonSerializer
    View Source

    DataTypeService(IDataValueEditorFactory, ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IDataTypeRepository, IDataTypeContainerRepository, IAuditRepository, IEntityRepository, IContentTypeRepository, IIOHelper, ILocalizedTextService, ILocalizationService, IShortStringHelper, IJsonSerializer, IEditorConfigurationParser)

    Declaration
    public DataTypeService(IDataValueEditorFactory dataValueEditorFactory, ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IDataTypeRepository dataTypeRepository, IDataTypeContainerRepository dataTypeContainerRepository, IAuditRepository auditRepository, IEntityRepository entityRepository, IContentTypeRepository contentTypeRepository, IIOHelper ioHelper, ILocalizedTextService localizedTextService, ILocalizationService localizationService, IShortStringHelper shortStringHelper, IJsonSerializer jsonSerializer, IEditorConfigurationParser editorConfigurationParser)
    Parameters
    Type Name Description
    IDataValueEditorFactory dataValueEditorFactory
    ICoreScopeProvider provider
    ILoggerFactory loggerFactory
    IEventMessagesFactory eventMessagesFactory
    IDataTypeRepository dataTypeRepository
    IDataTypeContainerRepository dataTypeContainerRepository
    IAuditRepository auditRepository
    IEntityRepository entityRepository
    IContentTypeRepository contentTypeRepository
    IIOHelper ioHelper
    ILocalizedTextService localizedTextService
    ILocalizationService localizationService
    IShortStringHelper shortStringHelper
    IJsonSerializer jsonSerializer
    IEditorConfigurationParser editorConfigurationParser

    Methods

    View Source

    Copy(IDataType, Int32)

    Declaration
    public Attempt<OperationResult<MoveOperationStatusType, IDataType>> Copy(IDataType copying, int containerId)
    Parameters
    Type Name Description
    IDataType copying
    System.Int32 containerId
    Returns
    Type Description
    Attempt<OperationResult<MoveOperationStatusType, IDataType>>
    View Source

    Copy(IDataType, Int32, Int32)

    Declaration
    public Attempt<OperationResult<MoveOperationStatusType, IDataType>> Copy(IDataType copying, int containerId, int userId = -1)
    Parameters
    Type Name Description
    IDataType copying
    System.Int32 containerId
    System.Int32 userId
    Returns
    Type Description
    Attempt<OperationResult<MoveOperationStatusType, IDataType>>
    View Source

    CreateContainer(Int32, Guid, String, Int32)

    Declaration
    public Attempt<OperationResult<OperationResultType, EntityContainer>> CreateContainer(int parentId, Guid key, string name, int userId = -1)
    Parameters
    Type Name Description
    System.Int32 parentId
    Guid key
    System.String name
    System.Int32 userId
    Returns
    Type Description
    Attempt<OperationResult<OperationResultType, EntityContainer>>
    View Source

    Delete(IDataType, Int32)

    Deletes an IDataType

    Declaration
    public void Delete(IDataType dataType, int userId = -1)
    Parameters
    Type Name Description
    IDataType dataType

    IDataType to delete

    System.Int32 userId

    Optional Id of the user issuing the deletion

    Remarks

    Please note that deleting a IDataType will remove all the IPropertyType data that references this IDataType.

    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
    Type Description
    Attempt<OperationResult>
    View Source

    GetAll(Int32[])

    Gets all IDataType objects or those with the ids passed in

    Declaration
    public IEnumerable<IDataType> GetAll(params int[] ids)
    Parameters
    Type Name Description
    System.Int32[] ids

    Optional array of Ids

    Returns
    Type Description
    IEnumerable<IDataType>

    An enumerable list of IDataType objects

    View Source

    GetByEditorAlias(String)

    Gets a IDataType by its control Id

    Declaration
    public IEnumerable<IDataType> GetByEditorAlias(string propertyEditorAlias)
    Parameters
    Type Name Description
    System.String propertyEditorAlias

    Alias of the property editor

    Returns
    Type Description
    IEnumerable<IDataType>

    Collection of IDataType objects with a matching control id

    View Source

    GetContainer(Guid)

    Declaration
    public EntityContainer GetContainer(Guid containerId)
    Parameters
    Type Name Description
    Guid containerId
    Returns
    Type Description
    EntityContainer
    View Source

    GetContainer(Int32)

    Declaration
    public EntityContainer GetContainer(int containerId)
    Parameters
    Type Name Description
    System.Int32 containerId
    Returns
    Type Description
    EntityContainer
    View Source

    GetContainers(Int32[])

    Declaration
    public IEnumerable<EntityContainer> GetContainers(int[] containerIds)
    Parameters
    Type Name Description
    System.Int32[] containerIds
    Returns
    Type Description
    IEnumerable<EntityContainer>
    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
    Type Description
    IEnumerable<EntityContainer>
    View Source

    GetContainers(IDataType)

    Declaration
    public IEnumerable<EntityContainer> GetContainers(IDataType dataType)
    Parameters
    Type Name Description
    IDataType dataType
    Returns
    Type Description
    IEnumerable<EntityContainer>
    View Source

    GetDataType(Guid)

    Gets a IDataType by its unique guid Id

    Declaration
    public IDataType GetDataType(Guid id)
    Parameters
    Type Name Description
    Guid id

    Unique guid Id of the DataType

    Returns
    Type Description
    IDataType IDataType
    View Source

    GetDataType(Int32)

    Gets a IDataType by its Id

    Declaration
    public IDataType GetDataType(int id)
    Parameters
    Type Name Description
    System.Int32 id

    Id of the IDataType

    Returns
    Type Description
    IDataType IDataType
    View Source

    GetDataType(String)

    Gets a IDataType by its Name

    Declaration
    public IDataType GetDataType(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the IDataType

    Returns
    Type Description
    IDataType IDataType
    View Source

    GetReferences(Int32)

    Declaration
    public IReadOnlyDictionary<Udi, IEnumerable<string>> GetReferences(int id)
    Parameters
    Type Name Description
    System.Int32 id
    Returns
    Type Description
    IReadOnlyDictionary<Udi, IEnumerable<System.String>>
    View Source

    Move(IDataType, Int32)

    Declaration
    public Attempt<OperationResult<MoveOperationStatusType>> Move(IDataType toMove, int parentId)
    Parameters
    Type Name Description
    IDataType toMove
    System.Int32 parentId
    Returns
    Type Description
    Attempt<OperationResult<MoveOperationStatusType>>
    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
    Type Description
    Attempt<OperationResult<OperationResultType, EntityContainer>>
    View Source

    Save(IEnumerable<IDataType>, Int32)

    Saves a collection of IDataType

    Declaration
    public void Save(IEnumerable<IDataType> dataTypeDefinitions, int userId)
    Parameters
    Type Name Description
    IEnumerable<IDataType> dataTypeDefinitions

    IDataType to save

    System.Int32 userId

    Id of the user issuing the save

    View Source

    Save(IDataType, Int32)

    Saves an IDataType

    Declaration
    public void Save(IDataType dataType, int userId = -1)
    Parameters
    Type Name Description
    IDataType dataType

    IDataType to save

    System.Int32 userId

    Id of the user issuing the save

    View Source

    SaveContainer(EntityContainer, Int32)

    Declaration
    public Attempt<OperationResult> SaveContainer(EntityContainer container, int userId = -1)
    Parameters
    Type Name Description
    EntityContainer container
    System.Int32 userId
    Returns
    Type Description
    Attempt<OperationResult>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • DataTypeService(IDataValueEditorFactory, ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IDataTypeRepository, IDataTypeContainerRepository, IAuditRepository, IEntityRepository, IContentTypeRepository, IIOHelper, ILocalizedTextService, ILocalizationService, IShortStringHelper, IJsonSerializer)
      • DataTypeService(IDataValueEditorFactory, ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IDataTypeRepository, IDataTypeContainerRepository, IAuditRepository, IEntityRepository, IContentTypeRepository, IIOHelper, ILocalizedTextService, ILocalizationService, IShortStringHelper, IJsonSerializer, IEditorConfigurationParser)
    • Methods
      • Copy(IDataType, Int32)
      • Copy(IDataType, Int32, Int32)
      • CreateContainer(Int32, Guid, String, Int32)
      • Delete(IDataType, Int32)
      • DeleteContainer(Int32, Int32)
      • GetAll(Int32[])
      • GetByEditorAlias(String)
      • GetContainer(Guid)
      • GetContainer(Int32)
      • GetContainers(Int32[])
      • GetContainers(String, Int32)
      • GetContainers(IDataType)
      • GetDataType(Guid)
      • GetDataType(Int32)
      • GetDataType(String)
      • GetReferences(Int32)
      • Move(IDataType, Int32)
      • RenameContainer(Int32, String, Int32)
      • Save(IEnumerable<IDataType>, Int32)
      • Save(IDataType, Int32)
      • SaveContainer(EntityContainer, Int32)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX