AquaLogic Interaction Development Kit (IDK) 6.0.0

IContentItemManager.GetContentItem Method (IFolder, String)

Retrieves an IContentItem in a folder by its name.

IContentItem GetContentItem(
   IFolder folder,
   string name
);

Parameters

folder
The folder containing the IContentItem; cannot be null.
name
The name of the IContentItem; cannot be null, empty, or longer than 255 characters. The string used for the name will be trimmed of leading and trailing whitespace and is case-insensitive during comparison.

Return Value

The IContentItem in the folder with the specified name otherwise null.

Remarks

The specified name is the full name of the content item. The name will be trimmed of leading and trailing whitespace and is case-insensitive for comparison. The name does not support wildcards.

// Assuming a contentItem is persisted in containingFolder
// Retrieve the item by name
IContentItem sameContentItem = contentItemManager.GetContentItem(containingFolder, contentItem.Name);
// sameContentItem.UUID is the same as contentItem.UUID

Exceptions

Exception Type Condition
ContentException The method call resulted in a Publisher exception.
ContentSecurityException The user does not have permission to access the folder.
SoapException There was a communication problem during the execution of the remote method call.
InvalidOperationException The folder has not been stored or has already been removed.
ArgumentException The name is an empty string or longer than 255 characters.

See Also

IContentItemManager Interface | Plumtree.Remote.PRC.Content.Item Namespace | IContentItemManager.GetContentItem Overload List