Start of change IBM Content Navigator, Version 2.0.3         

Creating a repository type

You can create a plug-in for a custom repository type to authenticate, search, and provide result sets for repository servers. For example, you might want to use a custom repository type to extend IBM® Content Navigator for your client application to use repositories that do not store documents. The custom repository type enables repository-specific authentication and other actions for your repository server.

Before you begin

Decide whether to use the custom repository type feature or use CMIS to support the connection between IBM Content Navigator and your custom repository.

About this task

If you decide to use the custom repository type proprietary interface instead of using CMIS, follow the steps that are provided in this task.

Procedure

To define a repository type:

  1. Create an internal identifier for the repository. The identifier is used for the return value for the PluginRepositoryType.getId method and the PluginRepositoryConnection.getType method.
  2. Create a name for the repository. The name is displayed in the user interface.
  3. Extend the PluginRepositoryType class to describe the repository type:
    1. Implement the getId method to return the internal identifier that you created in step 1.
    2. Implement the getName method to return the name that you created in step 2.
    3. Implement the login method to handle any repository-specific logic for desktop login. The login action is separate from all other actions so that it can be started from the desktop login when the repository is the authenticating repository.
    4. Implement the performAction to handle an action for the repository. The action is passed as a request parameter. The return parameter is a JSON response that is built by the logic in this method. You can use com.ibm.ecm.json classes to make this task easier.
  4. Extend the PluginRepositoryConnection class to describe the repository connection:
    1. Implement the getName method to return the internal identifier that you created in step 1.
    2. Implement the getUserId method to return the user identifier that was entered at login.
    3. Implement the getUserName method to return the long name of the user for the banner.
  5. Create subclasses that extend the classes in the Java script files PluginRepositoryGeneralConfigurationPane.js and PluginRepositoryConfigurationParametersPane.js to create a general configuration pane, and a configuration parameters pane for configuring your custom repository.

Sample plug-in files for a custom repository type

The following files in the sample plug-in define a repository type for a repository server that does not store documents.
Table 1. Sample files that define a plug-in repository type
File Description
SamplePluginRepositoryType.java This file extends the PluginRepositoryType.java class to create a repository type for a repository server that does not store documents.

What to do next

After you add the plug-in, you can select the repository type name from the menu for Create repository in the IBM Content Navigator administration tool. When you configure your repository, select the custom repository type for the plug-in and enter values in the general configuration pane and the configuration parameters pane that you created in step 5.
End of change