IContentItem
. All properties that can be added to a Data Entry Template are sub-types of IBaseProperty
. To properly define a Data Entry Template, use IDataEntryTemplateManager.CreateDataEntryTemplate
to create a new template and add one or more properties to the template using IDataEntryTemplate.AddProperty
. A newly-created Data Entry Template or any property modification to an existing Data Entry Template will not be permanently stored until IDataEntryTemplate.Store
is called.
The following example code shows how to create a Data Entry Template, add properties of different types, attach an existing Presentation Template to the template, and finally persist the Data Entry Template. // Create a DET object. IDataEntryTemplate det = detManager.CreateDataEntryTemplate(folder, "My Data Entry Template"); // Add an integer property. IIntegerProperty intProp = propertyManager.CreateIntegerProperty("Integer Prop", "Description for intProp"); det.AddProperty(intProp); // Add a boolean property IBooleanProperty boolProp = propertyManager.CreateBooleanProperty("Boolean Prop", "Description for boolProp"); det.AddProperty(boolProp); // Add a float property. IDoubleProperty doubleProp = propertyManager.CreateDoubleProperty("Double Prop", "Description for doubleProp"); det.AddProperty(doubleProp); // Add a date property. IDateProperty dateProp = propertyManager.CreateDateProperty("Date Prop", "Description for dateProp"); det.AddProperty(dateProp); // Add a text line property. // Text lines are brief strings without newline characters. // Use the text block property for storing longer strings. ITextLineProperty textLineProp = propertyManager.CreateTextLineProperty("TextLine Prop", "Description for textLineProp"); det.AddProperty(textLineProp); // Add an item reference property. // An item reference links to another content item. The // content item does not have to be associated with the same DET. // // Not shown is the item collection property. It is // similar to the item reference property, but links to // multiple content items. IItemReferenceProperty itemRefProp = propertyManager.CreateItemReferenceProperty("Item Reference Prop", "Description for itemRefProp"); det.AddProperty(itemRefProp); // Add a selection list property. // A selection list is a defined set of choices of which // one may be selected. This can be visualized as a // drop down box. String[] listValues = { "Portal", "Search Server", "Collaboration Server", "Content Server", "Analytics" }; ISelectionList selectionList = slManager.CreateSelectionList(folder, "Products Selection List", listValues); selectionList.Store(); ISelectionListProperty selectionListProp = propertyManager.CreateSelectionListProperty("Selection List Prop", "Description for SelectionListProp", selectionList); det.AddProperty(selectionListProp); // Add a text block property. // Text block properties are used to store long strings // that can span many lines. For short strings contained // on only one line, use the text line property instead. ITextBlockProperty textBlockProp = propertyManager.CreateTextBlockProperty("Text Block Prop", "Description for textBlockProp"); det.AddProperty(textBlockProp); // Add a file property. IFileProperty log = propertyManager.CreateFileProperty("Log File", "A log file taken while the problem occurred."); det.AddProperty(log); // Add an image property. IImageProperty screenShot = propertyManager.CreateImageProperty("Screen Shot", "A screen shot of the problem."); det.AddProperty(screenShot); // Attach an existing Presentation Template det.AttachPresentationTemplate(storedPresentationTemplate); // Actually store the DET with the attached Presentation Template and all the properties associated with it. det.Store();
InvalidOperationException
will be thrown when IContentItemManager.CheckInItem
is called. To publish a content item, AttachPresentationTemplate
is required to call with a IPresentationTemplate
with valid template text set, otherwise an InvalidOperationException
will be thrown.
For a list of all members of this type, see IDataEntryTemplate Members.
Namespace: Plumtree.Remote.PRC.Content.DataEntryTemplate
Assembly: idk (in idk.dll)
IDataEntryTemplate Members | Plumtree.Remote.PRC.Content.DataEntryTemplate Namespace