N1 Grid Service Provisioning System 5.0 Plug-in Development Guide

ComponentExporter Process

To enable an export function, use a process similar to the following sequence:

  1. In the backing component of the component type, declare the fully qualified class name of the componentExporter in the exporterClass variable.

    <varList>
      <var name="exporterClassName" 
        default="com.sun.n1.sps.pluginimpl.sample.export.StaticCompExporter"/>
    </varList>
  2. Define a class which implements the ComponentExporter interface.

    ComponentExporter calls the various methods on the ComponentMonitor input argument to build the component. These methods might include addComponentVar, addSourceInfoParam, setComponentDescription, and setComponentLabel.

    ComponentExporter can also call get routines to obtain information from the ComponentMonitor. These get routines might include getPluginComponentVars, getPluginHostVars, getActiveBrowser, getSourceInfoParam, and getLocation.

    ComponentExporter can also call exportResource to call into control blocks to execute component type-specific functionality for exporting the component.

  3. After constructing the component, the ComponentExporter can call setResource to set a physical resource to be bundled in the component, completing the export process.