N1 Grid Service Provisioning System 5.0 Plug-in Development Guide

Browsing and Exporting: Process Overview

From an external view, the browsing and exporting process is similar to the following sequence:

  1. The user selects a component type to create a component. If the backing component of the selected type has exporterClassName defined, the browse and export user interface is launched.

  2. The provisioning software obtains all the browser information in the BrowserInfo class. To obtain this information, the software calls the getAvailableBrowsers method of the ComponentExporter interface.

  3. The provisioning software obtains the information about the BrowserFactory from BrowserInfo and instantiates it. From there, the provisioning software gets the Browser object.

  4. From the Browser object, the software finds the root node by calling the getNode() method of Browser.

  5. When the user selects a node and continues with the check-in process, the provisioning software calls into the constructComponent method of the ComponentExporter class which finally exports and checks-in the resource.

From the plug-in development perspective, a more detailed view of this process is similar to the following sequence:

  1. The backing component of a component type defines a component variable named exporterClassName. The value of exporterClassName is the class that implements com.sun.n1.sps.plugin.export.ComponentExporter.

  2. The ComponentExporter class method getAvailableBrowsers returns an array of BrowserInfo objects. These BrowserInfo objects have the following information about the browser:

    • Name of the system service

    • Variable name in the above system service. This variable will have the BrowserFactory class as its value

    • Variable name in the above system service. This variable will have the class path for the browser as its value.

    • The actual class path, if system service is not used for class path.

  3. The BrowserFactory class has a method to get the browser which implements the Browser interface.

  4. The Browser method getNode(...) finds the nodes of a tree. When used with a null argument, getNode(...) should give the root node.

  5. The ComponentExporter class has another method to construct the component. This method is used once the actual browsing is done. The constructComponent method is passed a ComponentMonitor which is used to finally export and check-in the selected resource into the master server as part of the component.