Interface IItemStore
Interface for a data store that provides CRUD operations for item data.
Namespace: DataWeb.Structure
Assembly: DataWeb.Core.dll
Syntax
public interface IItemStore
Methods
DeleteMasterPartAsync(string)
Deletes the master part of an item with the given itemIdMaster
.
Declaration
Task DeleteMasterPartAsync(string itemIdMaster)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Returns
Type | Description |
---|---|
Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
GetDateModifiedAsync(string)
Gets the date when the item with the given itemIdMaster
was last modified.
Declaration
Task<DateTimeOffset?> GetDateModifiedAsync(string itemIdMaster)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Returns
Type | Description |
---|---|
Task<DateTimeOffset?> | A System.Threading.Tasks.Task representing the asynchronous operation. The task result contains the date when the item was last modified, or null if the item has never been modified. |
GetItemVersionLocalizationsAsync(string, Section)
Gets the list of localizations of an item with the given itemIdMaster
and section
.
Declaration
Task<IEnumerable<string>> GetItemVersionLocalizationsAsync(string itemIdMaster, Section section)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Section | section | The Section of the item. |
Returns
Type | Description |
---|---|
Task<IEnumerable<string>> | A System.Threading.Tasks.Task representing the asynchronous operation. The task result contains the list of localizations of the item. |
GetItemVersionPreviewCountAsync(string, Section)
Gets the number of preview versions of an item with the given itemIdMaster
and section
.
Declaration
Task<long> GetItemVersionPreviewCountAsync(string itemIdMaster, Section section)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Section | section | The Section of the item. |
Returns
Type | Description |
---|---|
Task<long> | A System.Threading.Tasks.Task representing the asynchronous operation. The task result contains the number of preview versions of the item. |
GetItemVersionsAsync(string, Section, bool)
Gets the versions of an item with the given itemIdMaster
and section
.
Declaration
Task<IEnumerable<ItemVersion>> GetItemVersionsAsync(string itemIdMaster, Section section, bool isDeleted = false)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Section | section | The Section of the item. |
bool | isDeleted | Whether to include deleted versions of the item. Defaults to |
Returns
Type | Description |
---|---|
Task<IEnumerable<ItemVersion>> | A System.Threading.Tasks.Task representing the asynchronous operation. The task result contains the list of versions of the item. |
GetMasterPartAsync(string)
Gets the master part of an item asynchronously.
Declaration
Task<Item.MasterPart> GetMasterPartAsync(string itemIdMaster)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The Id of the item to retrieve the master part for. |
Returns
Type | Description |
---|---|
Task<Item.MasterPart> | The master part of the item. |
GetNewVersionNameAsync(string, Section)
Gets a new version name for a given item and section.
Declaration
Task<string> GetNewVersionNameAsync(string itemIdMaster, Section section)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Section | section | The Section of the item. |
Returns
Type | Description |
---|---|
Task<string> | A new version name. |
GetSectionPartAsync(string, Section, string, string)
Gets the section part of an item asynchronously.
Declaration
Task<Item.SectionPart> GetSectionPartAsync(string itemIdMaster, Section section, string versionCulture, string versionName)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The Id of the item to retrieve the section part for. |
Section | section | The Section to retrieve the section part for. |
string | versionCulture | The version culture. |
string | versionName | The version name. |
Returns
Type | Description |
---|---|
Task<Item.SectionPart> | The section part of the item. |
SetLabelAsync(string, string)
Sets the label of an item asynchronously.
Declaration
Task SetLabelAsync(string itemIdMaster, string label)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The Id of the item to set the label for. |
string | label | The label to set. |
Returns
Type | Description |
---|---|
Task |
SetMasterPartAsync(MasterPart)
Sets the master part of an item asynchronously.
Declaration
Task<string> SetMasterPartAsync(Item.MasterPart masterPart)
Parameters
Type | Name | Description |
---|---|---|
Item.MasterPart | masterPart | The Item.MasterPart to set. |
Returns
Type | Description |
---|---|
Task<string> | The Id of the item. |
SetSectionPartAsync(SectionPart, string)
Sets the section part of an item asynchronously.
Declaration
Task SetSectionPartAsync(Item.SectionPart sectionPart, string sectionTableName)
Parameters
Type | Name | Description |
---|---|---|
Item.SectionPart | sectionPart | The Item.SectionPart to set. |
string | sectionTableName | The name of the section table to set. |
Returns
Type | Description |
---|---|
Task |
SetStatusAsync(string, ItemStatus)
Sets the status of an item with the given itemIdMaster
.
Declaration
Task SetStatusAsync(string itemIdMaster, ItemStatus status)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
ItemStatus | status | The new ItemStatus of the item. |
Returns
Type | Description |
---|---|
Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
SetVersionAsDefaultByCultureAsync(string, Section, string)
Sets a version of an item section as the default version by culture.
Declaration
Task SetVersionAsDefaultByCultureAsync(string itemIdMaster, Section section, string versionCulture)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Section | section | The Section of the item. |
string | versionCulture | The culture of the version to set as default. |
Returns
Type | Description |
---|---|
Task |
SetVersionAsDefaultByNameAsync(string, Section, string)
Sets a version of an item section as the default version by name.
Declaration
Task SetVersionAsDefaultByNameAsync(string itemIdMaster, Section section, string versionName)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Section | section | The Section of the item. |
string | versionName | The name of the version to set as default. |
Returns
Type | Description |
---|---|
Task |
SetVersionLinkedValuesAsync(string, Section, string, Dictionary<string, object>)
Sets the linked values for a version of an item section.
Declaration
Task SetVersionLinkedValuesAsync(string itemIdMaster, Section section, string versionName, Dictionary<string, object> linkedValues)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Section | section | The Section of the item. |
string | versionName | The name of the version. |
Dictionary<string, object> | linkedValues | The linked values to set for the version. |
Returns
Type | Description |
---|---|
Task |
SetVersionStatusAndCultureAsync(string, Section, string, string, VersionStatus, IEnumerable<string>)
Sets the status and culture for a version of an item.
Declaration
Task SetVersionStatusAndCultureAsync(string itemIdMaster, Section section, string versionName, string versionCulture, VersionStatus versionStatus, IEnumerable<string> cultures)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Section | section | The Section of the item. |
string | versionName | The name of the version. |
string | versionCulture | The culture of the version. |
VersionStatus | versionStatus | The VersionStatus to set for the version. |
IEnumerable<string> | cultures | The cultures for which to set the status. |
Returns
Type | Description |
---|---|
Task |
UpdateDateModifiedAsync(string)
Updates the modification date of the item with the given itemIdMaster
.
Declaration
Task UpdateDateModifiedAsync(string itemIdMaster)
Parameters
Type | Name | Description |
---|---|---|
string | itemIdMaster | The IdMaster of the item. |
Returns
Type | Description |
---|---|
Task | A System.Threading.Tasks.Task representing the asynchronous operation. |