To create or retrieve Publisher Data Entry Templates from a remote application, use the IDK IDataEntryTemplateManager interface.
Java
... // Get manager objects needed for creating a Data Entry Template. IDataEntryTemplateManager detManager = factory.getDataEntryTemplateManager(); IPropertyManager propertyManager = factory.getPropertyManager(); ISelectionListManager selectionListManager = factory.getSelectionListManager(); // Create a Data Entry Template object. IDataEntryTemplate det = detManager.createDataEntryTemplate(supportfolder, "Technical Support Incident Data Entry Template"); // Add an integer property. IIntegerProperty incident = propertyManager.createIntegerProperty("Incident ID", "The ticket number for this incident."); det.addProperty(incident); // Add a Boolean property. IBooleanProperty resolved = propertyManager.createBooleanProperty("Resolved", "True if the incident has been closed; false if it is still open."); det.addProperty(resolved); // Add a real property. IDoubleProperty severity = propertyManager.createDoubleProperty("Severity", "Percentage stating how severe the incident is."); det.addProperty(severity); // Add a date property. IDateProperty opened = propertyManager.createDateProperty("Date Opened", "The date and time the incident was reported."); det.addProperty(opened); // Add a text property. ITextLineProperty customerName = propertyManager.createTextLineProperty("Customer Name", "The name of the customer."); det.addProperty(customerName); // Add a long text property. ITextBlockProperty description = propertyManager.createTextBlockProperty("Incident Description", "A summary of the problem the customer is experiencing."); det.addProperty(description); // Add an item reference property. IItemReferenceProperty customerData = propertyManager.createItemReferenceProperty("Customer Information", "Links to information about the customer such as the contact and their phone number."); det.addProperty(customerData); // Add a selection list property. The selection list must be persisted before it is added. String[] listValues = {"ALI", "Search", "Collaboration", "Publisher", "Analytics"}; ISelectionList selectionList = selectionListManager.createSelectionList(supportfolder, "Products Selection List", listValues); selectionList.store(); ISelectionListProperty products = propertyManager.createSelectionListProperty("Product", "The product that the support incident is opened against", selectionList); det.addProperty(products); // Add a file property. IFileProperty log = propertyManager.createFileProperty("Log File", "The log file created when 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); // Store the Data Entry Template and all the properties associated with it. det.store(); return det; ...
.NET (C#)
... // Get manager objects needed for creating a Data Entry Template. IDataEntryTemplateManager detManager = factory.GetDataEntryTemplateManager(); IPropertyManager propertyManager = factory.GetPropertyManager(); ISelectionListManager selectionListManager = factory.GetSelectionListManager(); // Create a Data Entry Template object. IDataEntryTemplate det = detManager.CreateDataEntryTemplate(supportfolder, "Support Incident Data Entry Template"); // Add an integer property. IIntegerProperty incident = propertyManager.CreateIntegerProperty("Incident ID", "The ticket number for this incident."); det.AddProperty(incident); // Add a Boolean property IBooleanProperty resolved = propertyManager.CreateBooleanProperty("Resolved", "True if the incident has been closed; false if it is still open."); det.AddProperty(resolved); // Add a real property. IDoubleProperty severity = propertyManager.CreateDoubleProperty("Severity", "Percentage stating how severe the incident is."); det.AddProperty(severity); // Add a date property. IDateProperty opened = propertyManager.CreateDateProperty("Date Opened", "The date and time the incident was reported."); det.AddProperty(opened); // Add a text property. ITextLineProperty customerName = propertyManager.CreateTextLineProperty("Customer Name", "The name of the customer."); det.AddProperty(customerName); // Add a long text property. ITextBlockProperty description = propertyManager.CreateTextBlockProperty("Incident Description", "A summary of the problem the customer is experiencing."); det.AddProperty(description); // Add an item reference property. IItemReferenceProperty customerData = propertyManager.CreateItemReferenceProperty("Customer Information", "Links to information about the customer such as the contact and their phone number."); det.AddProperty(customerData); // Add a selection list property. The selection list must be persisted before it is added. string[] listValues = {"Portal", "Search", "Collaboration", "Publisher", "Analytics"}; ISelectionList selectionList = selectionListManager.CreateSelectionList(supportfolder, "Products Selection List", listValues); selectionList.Store(); ISelectionListProperty products = propertyManager.CreateSelectionListProperty("Product", "The product that the support incident is opened against", selectionList); det.AddProperty(products); // Add a file property. IFileProperty log = propertyManager.CreateFileProperty("Log File", "The log file created when 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); // Store the Data Entry Template and all the properties associated with it. det.Store(); return det; } ...
.NET (VB)
... ' Get manager objects needed for creating a Data Entry Template. Dim detManager As IDataEntryTemplateManager = factory.GetDataEntryTemplateManager Dim propertyManager As IPropertyManager = factory.GetPropertyManager Dim selectionListManager As ISelectionListManager = factory.GetSelectionListManager ' Create a Data Entry Template object. det = detManager.CreateDataEntryTemplate(supportfolder, "Support Incident Data Entry Template") ' Add an integer property. Dim incident As IIntegerProperty = propertyManager.CreateIntegerProperty("Incident ID", "The ticket number for this incident.") det.AddProperty(incident) ' Add a Boolean property. Dim resolved As IBooleanProperty = propertyManager.CreateBooleanProperty("Resolved", "True if the incident has been closed false if it is still open.") det.AddProperty(resolved) ' Add a double property. Dim severity As IDoubleProperty = propertyManager.CreateDoubleProperty("Severity", "Percentage stating how severe the incident is.") det.AddProperty(severity) ' Add a date property. Dim opened As IDateProperty = propertyManager.CreateDateProperty("Date Opened", "The date and time the incident was reported.") det.AddProperty(opened) ' Add a text property. Dim customerName As ITextLineProperty = propertyManager.CreateTextLineProperty("Customer Name", "The name of the customer.") det.AddProperty(customerName) ' Add a long text property. Dim description As ITextBlockProperty = propertyManager.CreateTextBlockProperty("Incident Description", "A writeup summarizing the problem the customer is experiencing.") det.AddProperty(description) ' Add an item reference property. Dim customerData As IItemReferenceProperty = propertyManager.CreateItemReferenceProperty("Customer Information", "Links to information about the customer such as the contact and their phone number.") det.AddProperty(customerData) ' Add a selection list property. The selection list must be persisted before it is added. ' This example checks to see if the selection list already exists before creating it. Dim selectionList As ISelectionList = Nothing Dim selectionLists() As ISelectionList = selectionListManager.GetSelectionLists(supportfolder) Dim sl As ISelectionList For Each sl In selectionLists If (sl.Name.Equals("Products Selection List")) Then selectionList = sl End If Next If (selectionList Is Nothing) Then Dim listValues() As String = {"Portal", "Search", "Collaboration", "Content Server", "Analytics"} selectionList = selectionList.CreateSelectionList(supportfolder, "Products Selection List", listValues) selectionList.Store() End If Dim products As ISelectionListProperty = propertyManager.CreateSelectionListProperty("Product", "The product that the support incident is opened against", SelectionList) det.AddProperty(products) ' Add a file property. Dim log As IFileProperty = propertyManager.CreateFileProperty("Log File", "The log file created when the problem occurred.") det.AddProperty(log) ' Add an image property. Dim screenShot As IImageProperty = propertyManager.CreateImageProperty("Screen Shot", "A screen shot of the problem.") det.AddProperty(screenShot) ' Store the Data Entry Template and all the properties associated with it. det.Store() Return det ...