Plumtree EDK (Enterprise Web Development Kit) 5.4.0

IContentItemManager.PublishContentItems Method 

Publishes all IContentItems in a folder and optionally publishes items in sub-folders.

void PublishContentItems(
   IFolder folder,
   bool publishSubfolders
);

Parameters

folder
The folder containing zero or more items to be published; cannot be null. Publishing empty folders has no effect.
publishSubfolders
If true, publish all content items in sub-folders; otherwise only publish content items in the immediate folder.

Remarks

All the published items will be copied to the publishing target set in Content Server for the folder in which they reside.

A best-effort is made to publish all items in the specified folder and, when publishSubfolders is true, for all subfolders. Failure to publish an item does not cause immediate failure and publishing is attempted for all remaining items. If a failure occurred during this best-effort publishing, a ContentException will be thrown.

If a folder contains both publishable and non-publishable items, the non-publishable items will cause failure. See the above best-effort publishing rules.

If any of the content items contained in a folder fail to be published, the ContentException thrown will contain information indicating which item(s) fail; however, the format of the exception message might vary in future versions. Parsing of the error message to retrieve information is not recommended. There is no reliable way to retrieve information about which items succeeded and which failed.

Publishing multiple content items is a blocking operation. Control will return to the caller after all items are published or a failure occurs. Extremely long running publishing operations may cause a connection timeout and an exception on the client but they will continue to publish in Content Server.

Refer to IContentItem.PublishContentItem for details about publishing individual content items and the Administrator Guide for Content Server for general information about publishing a content item.

Exceptions

Exception TypeCondition
ContentSecurityException The user does not have permission to publish content items.
InvalidOperationException The the folder has not been persisted or has already been removed.
ContentException The method call resulted in a Content Server 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