Initialization Metadata Methods

In this section:

Business agents, listener initializers, encryption exits, preparsers, and preemitters all support a metadata interface to permit their setup using the console. Although implementing the initialization metadata calls is optional, their use is highly recommended. Failure to implement these calls results in the console being unable to manage exit specification, and the assumption that the exit can accommodate its own arbitrary parameter strings; no validation is performed.

The Wizard tools provided to construct exit frameworks automatically generate these metadata methods to describe defined parameters. Usually, there is no reason to modify the code in generated metadata exits. The descriptions of the most common metadata methods are provided here for completeness.


Top of page

x
public String getDesc()

Returns a short string describing the purpose of the exit. For example, the description of XDCopyAgent is "Copies document from in to out".


Top of page

x
public int getIPCount()

Returns the number of parameters for the exit init() routine. If not implemented in the business agent, the default returns –1, to indicate that parameter validation and specification is not used. If the exit does not accept init() parameters, this call should return 0.

Note: This metadata method is deprecated in favor of the XDPropertyInfo metadata.


Top of page

x
public String getIPName(int i)

Returns the name of the input parameter (base 0). If not implemented in the business agent, the default returns an empty string.

Note: This metadata method is deprecated in favor of the XDPropertyInfo metadata.


Top of page

x
public int getIPType(int i)

Returns the type of the indexed parameter (base 0). Types are defined as:

Mnemonic

Description

XDExitBase.IP_BOOLEAN

True or false.

XDExitBase.IP_DIR

Path to a directory.

XDExitBase.IP_ENUM

Itemized list.

XDExitBase.IP_FILE

File name that must exist.

XDExitBase.IP_INT

Integer type. Guaranteed to be a positive integer.

XDExitBase.IP_PASSWD

String type. Appears on the console masked by asterisks, and stored in the configuration in an encrypted form. Not encrypted when passed to the calling exit.

XDExitBase.IP_PATH

Path to a file.

XDExitBase.IP_STRING

String type.

Note: This metadata method is deprecated in favor of the XDPropertyInfo metadata.



x
public String getIPDesc(int i)

Returns the description for the indexed parameter (base 0).

Note: This metadata method is deprecated in favor of the XDPropertyInfo metadata.


Top of page

x
public boolean getIPReqd(int i)

Returns whether the indexed parameter (base 0) is required. Optional parameters may be provided to the application or may be missing. Required parameters should not follow optional parameters.

Note: This metadata method is deprecated in favor of the XDPropertyInfo metadata.


Top of page

x
public String[ ] getIPEnum(int i)

Returns an array of strings containing valid values for the parameter. If this is not a list type parameter, the call returns null.

Note: This metadata method is deprecated in favor of the XDPropertyInfo metadata.


iWay Software