Sun N1 Service Provisioning System 5.2 Plug-in Development Guide

Before You Begin

Before you can use the command-line APIs, you must acquire a CommandManager from a CommandManagerBuilder. The following code example illustrates how to acquire a CommandManager.

public class CommandManagerBuilder {

  /**
    *  Set the directory for the CLI installation directory
    */
    public setHomeDirectory(File cliHomeDir){ ... }

  /**
    *  Build a command manager with the properties set in this class
    *  @throws ConfigurationException incorrect properties 
    *  specified for a valid CommandManager
    */
    public CommandManager build() throws ConfigurationException {...}

}

Note –

Invoking the build method is an expensive operation. As a result, you should create only one CommandManager from which to execute commands.