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
itemTypestring- Type of the item.
itemIdstring- The item identifier.
sortint- The sort index of the item.
contextItemContext- 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
pagePage- 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
paragraphParagraph- 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
itemSystemNamesIEnumerable<string>deleteModestring
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
itemTypestring- Type of the item.
itemIdstring- The item identifier.
draftbool- Look for draft
previewDateDateTime- Date of preview
Returns
- Item
- item
GetItemById<T>(string)
Gets the item.
T GetItemById<T>(string itemId) where T : ItemEntry, new()
Parameters
itemIdstring- 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
pageIdint- Page Id.
draftbool- Is item in a draft mode
previewDateDateTime- Date to preview the content from
Returns
- Item
- Item with the given Id.
GetTitle(Item)
Returns page title.
string GetTitle(Item item)
Parameters
itemItem- The item.
Returns
- string
- Value to use as page title.
RestoreItem(ItemStoreContainer)
void RestoreItem(ItemStoreContainer store)
Parameters
storeItemStoreContainer
RestoreItem(ItemStoreContainer, bool)
void RestoreItem(ItemStoreContainer store, bool generateNewId)
Parameters
storeItemStoreContainergenerateNewIdbool
SaveItem(ItemEntry)
Saves the new item to persistence
ItemEntry SaveItem(ItemEntry item)
Parameters
itemItemEntry- The item to save to persistence
Returns
- ItemEntry
- The newly save item
SaveItemType(ItemType)
void SaveItemType(ItemType itemType)
Parameters
itemTypeItemType
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
itemTypestring- The itemtype of the item to update sort index
itemIdstring- The id of the item to update sort index
sortIndexint- 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)