Configuration Parameters

Parameters are defined as properties in the XDPropertyInfo() method calls. Each property is a [static] class giving the internal property name, screen prompt, detailed description, type, and so on. The properties are grouped into PropertyGroup[] which are then passed to the server through an ExitInfo() definition in the constructor of the exit. These methods are described in the Javadoc.

The following syntax is an example of a single parameter:

public void validateExitParms(Map<String,String> parms, IXLogger logger)

A functioning exit will validate input parameters during design time. At that time, parameters are passed to a validateExitParms() method as a Map<String,String>, but iFL cannot be evaluated. You can, however, validate iFL syntax if it is used. The iFL compiler provides methods to check for syntax issues without actually compiling the function, as shown in the following syntax:

public void validateExitParms(Map<String,String> parms, IXLogger logger)   throws ConfigurationException
{
    String fileName = (String) parms.get(filenameParm.getName());
    if(!isPresent(fileName))
    {
        throw new ConfigurationException("File name is required");
    }
    int r = FunctionContainer.isValidExpression(fileName);
    if(r == FunctionContainer.SYNTAXERR)
    {
        throw new ConfigurationException("Invalid iFL in 
"+filenameParm.getLongName());
    }
    else if(r == FunctionContainer.CONSTANT)
    {
        // other validation here?
    }
}

iWay Software