Oracle® WebCenter Interaction Development Kit 10.3.3.0.0

IPresentationTemplateManager.CreatePresentationTemplate Method 

Creates a new IPresentationTemplate.

IPresentationTemplate CreatePresentationTemplate(
   IFolder containingFolder,
   string name,
   string templateText
);

Parameters

containingFolder
The folder the Presentation Template will be created in; cannot be null.
name
Name of the template. Presentation Template names are case-insensitive, cannot be the empty string, and cannot be longer than 255 characters. The string used for the name will be trimmed of leading and trailing whitespace when it is stored and is case-insensitive during name comparison.
templateText
Template text of this Presentation Template. The template text will determine the published layout of any content item associated with this Presentation Template. The text cannot be null but the text can be empty. There is no limit on the length of the template text.

Return Value

An IPresentationTemplate that is not yet persisted. Call IPresentationTemplate.Store to persist the template.

Remarks

IPresentationEntryTemplate.Store needs to be called to persist a newly-created Presentation Template, or any modification to the Presentation Template.

An InvalidOperationException will be thrown if the containing folder has not been stored.

The following is an example of creating an IPresentationTemplate.
string templateText = "<a href=\"<pcs:value property=\'homepage.location\'></pcs:value>\">";
IFolder rootFolder = folderManager.GetRootFolder();
IPresentationTemplate presentationTemplate = presentationTemplateManager.CreatePresentationTemplate(rootFolder, "New Presentation Template", templateText);

Exceptions

Exception Type Condition
InvalidOperationException The specified folder has not yet been stored or has already been removed.
ArgumentException The name is an empty string or longer than 255 characters.

See Also

IPresentationTemplateManager Interface | Plumtree.Remote.PRC.Content.PresentationTemplate Namespace