The ObjectStoreItem component is used to encapsulate an object store item into a simple component for use by a number of command and response components. The client application uses the IObjectStoreItem interface to specify the type, name, version series ID, and version ID of an object store item to use as an input parameter for a command component. The interface can also be used to retrieve this same information about an object store item when it is returned in a response component.
coclass ObjectStoreItem {
[default] interface IObjectStoreItem;
};
DLL | FnAppIntCmdComponents.dll |
See Also | Add command |
The IObjectStoreItem interface defines the following methods:
Method | Description |
---|---|
GetItemType | Returns the type of the object store item that is contained in the response component. |
GetObjectStoreName | Returns the name of the object store item that is contained in the response component. |
GetVersionID | Returns the version ID of the object store item that is contained in the response component. |
GetVersionSeriesID | Returns the version series ID of the object store item that is contained in the response component. |
Initialize | Initializes the ObjectStoreItem component with the type, name, version series ID, and version ID of an object store item to use as an input parameter for a command component. |
The following is a fragment from the complete example for the Add command, which utilizes an ObjectStoreItem component.
...
// Initialize the ObjectStoreItem component with // the items' type, name, version series ID and version ID. ItemType eItemType = eItemTypeDocument; _bstr_t bstrObjectStoreName = (_T("Alaska")); _bstr_t bstrVersionSeriesID = (_T("{6BC064A2-2D58-4B0A-AEF2-B2F8A1100000}")); _bstr_t bstrVersionID = (_T("{DDE54469-36D9-4fe9-8676-445E4994DE1F}")); std::cout << "Initializing the ObjectStoreItem component..." << std::endl;
spIObjectStoreItem0->Initialize(eItemType, bstrObjectStoreName, bstrVersionSeriesID, bstrVersionID); _bstr_t bstrLinkClassID = (_T("{C91111A9-CE9C-43e6-8548-8A08F43F9726}")); RelationshipType enLinkType = eTypeLinkTo; // Initialize the LinkDescriptor component to hold the link std::cout << "Initializing LinkDescriptor component 1..." << std::endl; spILinkDescriptor0->Initialize(spIObjectStoreItem0, bstrLinkClassID, enLinkType); ... // Obtain the specific response information contained in the custom AddRsp component IAddRspPtr spIAddRsp(spIAppIntRsp);
_ASSERTE(spIAddRsp != 0);
IObjectStoreItem *spIObjectStoreItemAdded = spIAddRsp->GetObjectStoreItem();
_ASSERTE(spIObjectStoreItem != 0);
std::cout << "ObjectStoreName=" << (LPCSTR) spIObjectStoreItemAdded->GetObjectStoreName() << std::endl;
std::cout << "ItemType=" << (LPCSTR) CItemTypeConverter::EnumToBSTR(spIObjectStoreItemAdded->GetItemType()) << std::endl;
std::cout << "VersionSeriesID=" << (LPCSTR) spIObjectStoreItemAdded->GetVersionSeriesID() << std::endl;
std::cout << "VersionID=" << (LPCSTR) spIObjectStoreItemAdded->GetVersionID() << std::endl; ...