Mandatory Methods

Each JPO must have certain methods defined. The following subsections list each of the methods. In general, all methods take a first argument of type Context.

The following topics are discussed:

Constructors

Each JPO should contain a public constructor that takes a Context object and a String array. The String array holds any arguments that need to be passed to the constructor, such as an objectid.

/**
 * Create a new RADProject object from a given id
 *
 * @param context the Matrix <code>Context</code>object
 * @param args hols the following input arguments:
   *   0 - Strign holding "objectId"
 * @return a RADProject
 * throws exception if the operation fails
 * @since AEF 9.0.0
 */
public ${CLASSNAME} (Context context, String[] args) throws Exception
{
:
}

Main Entry Point

Each JPO must contain a public method named mxMain that takes a Context object and a String array, and returns an int. This method is called by default when no method name is explicitly specified.

/**
 * Main entry point
 *
 * @param context the Matrix <code>Context</code>object
 * @param args array of input argument strings
 * @return an integer status code (0 = success)
 * throws exception if the operation fails
 * @since AEF 9.0.0
 */
public int mxMain (Context context, String[] args) throws Exception
{
:
}