IItemService Interface
Contains functionality to deal with items and BOM.
Namespace: bcpDevKit
Assembly: bcpDevKit.dll
Syntax
public interface IItemService
Methods
Type |
Name |
Description |
---|---|---|
AddItem(string itemNumber, string cat, string titel, string desc) |
Adds an Item to the package. The item number will be an unique identifier in vault and it should be unique, for instance “100001”. |
|
GetItem(string itemNumber) |
Returns the item, which has the passed itemNumber if it exists. |
|
AddFileLinkToItem(ItemIteration itemVersion, FileIteration fileVersion) |
Links a file version to a specific item version. |
Remarks
AddFileLinkToItem ensures that all files are correctly linked to the item. It handles if the link should be primary, secondary or tertiary.
If the file is a content center file, a StandardComponent link will be created. If the file has design files, they will be linked as tertiary links to the item. Files marked as ConfigurationFactory will only be attached to the item.
You can get the latest iteration of an item/file with itemMaster.LatestIteration or file.LatestIteration.
Examples
You have to set the creation date otherwise, the Vault client brings the error message “1417 GetBOMFailedNothingEffective” when accessing that item.
var item = bcpService.ItemService.AddItem("9992", "Document", "Title 9992", "Desc 9992");
item.LatestIteration.SetCreateDateFormatted(DateTime.Today);