Service Configuration (SCI) pages are integrated with portal editors and used to define settings used by a content crawler.
Content crawlers must provide SCI pages for the Content Source and/or Content Crawler editors to build the preferences used by the content crawler. The URL to any associated SCI page(s) must be entered on the Advanced URLs page of the Web Service - Content editor.
All optional settings are in the class CrawlerConstants. For a list, see SCI Variables for Content Crawler Properties.
SCI provides an easy way to write configuration pages that are integrated with portal editors. SCI wraps the portal’s XUI XML and allows you to create controls without XUI. For a complete listing of classes and methods in the plumtree.remote.sci namespace, see the IDK API documentation. The following methods must be implemented: .
Imports System Imports Plumtree.Remote.Sci Imports Plumtree.Remote.Util Imports System.Security.Cryptography Namespace Plumtree.Remote.Crawler.DRV 'Page to enter name and password- first page for DataSourceEditor Public Class AuthPage Inherits AbstractPage #Region "Constructors" Public Sub New(ByVal editor As AbstractEditor) MyBase.New(editor) End Sub #End Region #Region "Functions" 'Gets the content for the page in string form. 'One textElement for name, one PasswordElement for password 'Note the way that the password is stored & the encryption used Public Overrides Function GetContent(ByVal errorCode As Integer, ByVal pageInfo As NamedValueMap) As String Dim page As New SciPage Dim userElement As New SciTextElement(DRVConstants.USER_NAME, "Enter the user name to authenticate to SQL Server") Dim userName As String = pageInfo.Get(DRVConstants.USER_NAME) If Not userName Is Nothing Then userElement.SetValue(userName) End If userElement.SetMandatoryValidation("User name is mandatory") Dim passElement As New SciPasswordElement(DRVConstants.PASSWORD, "Enter the password to authenticate to SQL Server", "Confirm", "Passwords do not match") 'deal with asterisks and the like- for now, just show password Dim password As String = pageInfo.Get(DRVConstants.ENC_PASSWORD) 'save the initial password? Dim settings As NamedValueMap = Me.Editor.Settings settings.Put(DRVConstants.ENC_PASSWORD, password) Editor.Settings = settings 'set asterisks for the value passElement.SetValue(DRVConstants.ASTERISKS) page.Add(userElement) page.Add(passElement) Return page.ToString End Function 'Gets the help page URI for the page. Public Overrides Function GetHelpURI() As String Return "" End Function 'Gets the image (icon) URI for the page. (This setting is for backward compatibility; no icon is displayed in version 5.0.) Public Overrides Function GetImageURI() As String Return "" End Function 'Gets the instructions for the page, displayed below the title in the editor. Public Overrides Function GetInstructions() As String Return "Enter SQL Server authentication information" End Function 'Gets the title for the page. Public Overrides Function GetTitle() As String Return "SQL Server Authentication" End Function 'Validates the current page and throws a ValidationException to report an error. Returns a NamedValueMap array of the settings entered on the editor page. Public Overrides Sub ValidatePage(ByVal pageInfo As NamedValueMap) 'if the password is not asterisks, then put it into settings Dim password As String = pageInfo.Get(DRVConstants.PASSWORD) If Not password.Equals(DRVConstants.ASTERISKS) Then Dim settings As NamedValueMap = Me.Editor.Settings 'encrypt this Dim encPassword As String = Utilities.EncryptPassword(password, Me.Editor.Locale) settings.Put(DRVConstants.ENC_PASSWORD, encPassword) Editor.Settings = settings End If End Sub #End Region End Class End Namespace