Interface IItemService
- Namespace
- Dynamicweb.Content
- Assembly
- Dynamicweb.dll
The IItemService interface defines operations for working with the Item Aggregate
[Obsolete("Use ItemService instead.")]
public interface IItemService
Methods
CopyItem(string, string, int, ItemContext)
Creates a copy of the Item with the specified item id and item type
ItemEntry CopyItem(string itemType, string itemId, int sort, ItemContext context)
Parameters
itemType
string- Type of the item.
itemId
string- The item identifier.
sort
int- The sort index of the item.
context
ItemContext- The item context.
Returns
- ItemEntry
- A copy of the item with the specified id
CopyPageItem(Page)
Creates a copy of the Item with the specified item id and item type
ItemEntry CopyPageItem(Page page)
Parameters
page
Page- The page from which to make a copy of it's associated Item
Returns
- ItemEntry
- A copy of the item associated with the specified page, of any
CopyParagraphItem(Paragraph)
Creates a copy of the Item with the specified item id and item type
ItemEntry CopyParagraphItem(Paragraph paragraph)
Parameters
paragraph
Paragraph- The paragraph from which to make a copy of it's associated Item
Returns
- ItemEntry
- A copy of the item associated with the specified paragraph, of any
DeleteItemTypes(IEnumerable<string>, string)
void DeleteItemTypes(IEnumerable<string> itemSystemNames, string deleteMode)
Parameters
itemSystemNames
IEnumerable<string>deleteMode
string
GetItem(string, string)
Gets the item.
Item GetItem(string itemType, string itemId)
Parameters
Returns
- Item
- item
GetItem(string, string, bool)
Gets the draft item or the current item, if no draft exists.
Item GetItem(string itemType, string itemId, bool draft)
Parameters
Returns
- Item
- item
GetItem(string, string, bool, DateTime)
Gets the draft item or the current item, if no draft exists.
Item GetItem(string itemType, string itemId, bool draft, DateTime previewDate)
Parameters
itemType
string- Type of the item.
itemId
string- The item identifier.
draft
bool- Look for draft
previewDate
DateTime- Date of preview
Returns
- Item
- item
GetItemById<T>(string)
Gets the item.
T GetItemById<T>(string itemId) where T : ItemEntry, new()
Parameters
itemId
string- The item identifier.
Returns
- T
- ItemEntry.
Type Parameters
T
GetItemByPageId(int, bool)
Gets page item by the given page Id.
Item GetItemByPageId(int pageId, bool draft)
Parameters
Returns
- Item
- Item with the given Id.
GetItemByPageId(int, bool, DateTime)
Gets page item by the given page Id.
Item GetItemByPageId(int pageId, bool draft, DateTime previewDate)
Parameters
pageId
int- Page Id.
draft
bool- Is item in a draft mode
previewDate
DateTime- Date to preview the content from
Returns
- Item
- Item with the given Id.
GetTitle(Item)
Returns page title.
string GetTitle(Item item)
Parameters
item
Item- The item.
Returns
- string
- Value to use as page title.
RestoreItem(ItemStoreContainer)
void RestoreItem(ItemStoreContainer store)
Parameters
store
ItemStoreContainer
RestoreItem(ItemStoreContainer, bool)
void RestoreItem(ItemStoreContainer store, bool generateNewId)
Parameters
store
ItemStoreContainergenerateNewId
bool
SaveItem(ItemEntry)
Saves the new item to persistence
ItemEntry SaveItem(ItemEntry item)
Parameters
item
ItemEntry- The item to save to persistence
Returns
- ItemEntry
- The newly save item
SaveItemType(ItemType)
void SaveItemType(ItemType itemType)
Parameters
itemType
ItemType
SynchronizeListField(Item, Item, string)
void SynchronizeListField(Item masterItem, Item languageItem, string fieldName)
Parameters
UpdateItemSortIndex(string, string, int)
Updates the item sort index
void UpdateItemSortIndex(string itemType, string itemId, int sortIndex)
Parameters
itemType
string- The itemtype of the item to update sort index
itemId
string- The id of the item to update sort index
sortIndex
int- The index used for sorting
UpdateItemTitle(ItemType, Item, string)
Updates item field used for page title.
void UpdateItemTitle(ItemType itemMetaType, Item item, string title)
Parameters
UpdateItemTitle(string, string, string)
Updates item field used for page title.
void UpdateItemTitle(string itemType, string itemId, string title)