SetPropertyValue for the various property types and then persist the values with IContentItemManager.CheckInItem. To update property values for an existing content item, first check out the item with IContentItemManager.CheckOutItem, modify property values with Get/SetPropertyValue, and then persist the modifications with IContentItemManager.CheckInItem. For information about the conditions that make a content item searchable in ALI Search, refer to the documentation in IPresentationTemplate.Searchable.
Note: To use any file upload/download functionality for setting/retreving a file or image property value, WSE 2.0 (http://msdn.microsoft.com/webservices/building/wse/) must be installed. The following example code determines what types of properties exist on a content item and how to modify their values: //To modify property values on an existing item, first check-out the item.
itemManager.CheckOutItem(contentItem);
//Retrieve all the properties on the content item
IBaseProperty[] allProps = contentItem.GetAllProperties();
for (int i = 0; i < allProps.Length; i++)
{
//Test if the property a text block property
if (allProps[i] is ITextBlockProperty)
{
String oldValue = "";
if (contentItem.HasPropertyValue(allProps[i]))
{
//Retrieve the old text block value if it has been set previously
oldValue = contentItem.GetTextBlockPropertyValue(allProps[i]);
}
//Set the new value
contentItem.SetTextBlockPropertyValue(allProps[i], "Updated Value: " + oldValue);
}
//Test if the property is an integer property
else if (allProps[i] is IIntegerProperty)
{
int oldValue = 0;
if (contentItem.HasPropertyValue(allProps[i]))
{
oldValue = contentItem.GetIntegerPropertyValue(allProps[i]);
}
contentItem.SetIntegerPropertyValue(allProps[i], 100 + oldValue);
//Test for rest of the property types...
}
}
//Finally, check-in the item to persist the updated values
itemManager.CheckInItem(contentItem, "Check In Comment");
Searchable set to true, andFor a list of all members of this type, see IContentItem Members.
Namespace: Plumtree.Remote.PRC.Content.Item
Assembly: idk (in idk.dll)
IContentItem Members | Plumtree.Remote.PRC.Content.Item Namespace