View Source
Interface IDataTypeService
Defines the DataType Service, which is an easy access to operations involving IDataType
Assembly: Umbraco.Core.dll
Syntax
public interface IDataTypeService : IService
Methods
View Source
Copy(IDataType, Int32)
Declaration
virtual Attempt<OperationResult<MoveOperationStatusType, IDataType>> Copy(IDataType copying, int containerId)
Parameters
Type |
Name |
Description |
IDataType |
copying |
|
System.Int32 |
containerId |
|
Returns
View Source
Copy(IDataType, Int32, Int32)
Copies the give IDataType to a given container
We have the default implementation here to avoid breaking changes for the user
Declaration
virtual Attempt<OperationResult<MoveOperationStatusType, IDataType>> Copy(IDataType copying, int containerId, int userId = -1)
Parameters
Type |
Name |
Description |
IDataType |
copying |
The data type that will be copied
|
System.Int32 |
containerId |
The container ID under where the data type will be copied
|
System.Int32 |
userId |
The user that did the Copy action
|
Returns
View Source
CreateContainer(Int32, Guid, String, Int32)
Declaration
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
View Source
Delete(IDataType, Int32)
Declaration
void Delete(IDataType dataType, int userId = -1)
Parameters
Type |
Name |
Description |
IDataType |
dataType |
IDataType to delete
|
System.Int32 |
userId |
Id of the user issuing the deletion
|
View Source
DeleteContainer(Int32, Int32)
Declaration
Attempt<OperationResult> DeleteContainer(int containerId, int userId = -1)
Parameters
Type |
Name |
Description |
System.Int32 |
containerId |
|
System.Int32 |
userId |
|
Returns
View Source
GetAll(Int32[])
Gets all IDataType objects or those with the ids passed in
Declaration
IEnumerable<IDataType> GetAll(params int[] ids)
Parameters
Type |
Name |
Description |
System.Int32[] |
ids |
Optional array of Ids
|
Returns
View Source
GetByEditorAlias(String)
Declaration
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
EntityContainer GetContainer(Guid containerId)
Parameters
Type |
Name |
Description |
Guid |
containerId |
|
Returns
View Source
GetContainer(Int32)
Declaration
EntityContainer GetContainer(int containerId)
Parameters
Type |
Name |
Description |
System.Int32 |
containerId |
|
Returns
View Source
GetContainers(Int32[])
Declaration
IEnumerable<EntityContainer> GetContainers(int[] containerIds)
Parameters
Type |
Name |
Description |
System.Int32[] |
containerIds |
|
Returns
View Source
GetContainers(String, Int32)
Declaration
IEnumerable<EntityContainer> GetContainers(string folderName, int level)
Parameters
Type |
Name |
Description |
System.String |
folderName |
|
System.Int32 |
level |
|
Returns
View Source
GetContainers(IDataType)
Declaration
IEnumerable<EntityContainer> GetContainers(IDataType dataType)
Parameters
Returns
View Source
GetDataType(Guid)
Declaration
IDataType GetDataType(Guid id)
Parameters
Type |
Name |
Description |
Guid |
id |
Unique guid Id of the DataType
|
Returns
View Source
GetDataType(Int32)
Declaration
IDataType GetDataType(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
Id of the IDataType
|
Returns
View Source
GetDataType(String)
Declaration
IDataType GetDataType(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
Name of the IDataType
|
Returns
View Source
GetReferences(Int32)
Returns a dictionary of content type Udis and the property type aliases that use a
IDataType
Declaration
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
Attempt<OperationResult<MoveOperationStatusType>> Move(IDataType toMove, int parentId)
Parameters
Type |
Name |
Description |
IDataType |
toMove |
|
System.Int32 |
parentId |
|
Returns
View Source
RenameContainer(Int32, String, Int32)
Declaration
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(IEnumerable<IDataType>, Int32)
Declaration
void Save(IEnumerable<IDataType> dataTypeDefinitions, int userId = -1)
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)
Declaration
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
Attempt<OperationResult> SaveContainer(EntityContainer container, int userId = -1)
Parameters
Returns