Message Set API

 

The com.adventnet.CLI.messageset package contains classes for generating commands based on Command Set and Data Set. It has the CommandSet class for parsing a Command Set definitions file. Similarly, the DataSet class is used for parsing a Data Set for the corresponding Command Set. The additional classes, which are used to store information about a particular command, are explained below.

 

CommandSet / DataSet classes contain a set of CLI commands parsed from a command template file, i.e., XML file. You have to define the various commands in the template and this file should be passed to the constructor. Once instantiated, any command can be assembled using the class.

 

CommandSet cmdSet = new CommandSet("unixcmds.ccs");

DataSet dataSet = new DataSet("unixcmds.dat");

cmdSet.setDataSet(dataSet);

 

CLICommandTemplatecontains the command template that reads from a template definitions file. The object contains a list of cmdObjects with the various parameters. You need not instantiate this class because it is done during parsing of the template definitions file.

 

CLIDataInstanceclass contains an instance of data for a command in the Command Set. The various parameters of the command data are read from a template definitions file similar to the CommandSet file. The object contains a list of cmdObjects with the various parameters. You need not instantiate this class since it is done during parsing of the template definitions file.

 

CmdObject class represents the objects on which the command is executed. This is filled in from the XML definitions. It contains the parameters list, and in turn may contain another object list. This class need not be instantiated.

 

CmdParamsclass contains the command parameters for a particular command or object within a command. It contains the parameter name, parameter type, value type, and description of the parameter.

 

CmdParams paramsList[] = CLICmd.getCmdParamsList();

 

Please refer to Java documentation for complete details.

 

Related Topics

 



Copyright © 2009 ZOHO Corp. All Rights Reserved.