AquaLogic Interaction Development Kit (IDK) 6.0.0 |

# IContentItemManager.PublishContentItem Method

Publishes the `IContentItem` and copies it to a publishing target set in Publisher.

void PublishContentItem(
IContentItem contentItem
);

#### Parameters

contentItem
  The content item to be published; cannot be `null`.

#### Remarks

This method should be called prior to retrieving the publish URL via `IContentItem.PublishURL` property, otherwise an `InvalidOperationException` will be thrown. An `InvalidOperationException` will also be thrown if the `IDataEntryTemplate` of the item does not have an attached `IPresentationTemplate`. A `ContentException` will be thrown if the attached `IPresentationTemplate` contains invalid template text. `IContentItem.Publishable` can be used to check if some of the above conditions are met. However, if `IContentItem.Publishable` returns true it does not guarantee the content item will be published successfully.

Refer to the Administrator Guide for AquaLogic Interaction Publisher for more details about publishing content items.

For an example of using PublishContentItem, refer to IContentItemManager

#### Exceptions

Exception Type | Condition
--- | ---
ContentSecurityException | The user does not have permission to publish the item.
InvalidOperationException | The content item's `IDataEntryTemplate` does not have an attached `IPresentationTemplate`, the attached `IPresentationTemplate` contains invalid template text, or the content item has not been persisted or has been removed.
ContentException | The method call resulted in a Publisher exception.
SoapException | There was a communication problem during the execution of the remote method call.

#### See Also

IContentItemManager Interface | Plumtree.Remote.PRC.Content.Item Namespace