Identifying Invalid Parameters

If a parameter is identified as invalid, the task is required to issue a ParameterValidationException object to the Services Framework. The user interface uses the exception object to show which parameter is invalid as identified by its unique key. The value found in the validation error field of this object is used to show why the field is in error.

Example

If a task has a parameter that is required to be a number between 1 and 10, the validation process issues a new ParameterValidationException object to the user interface, if:
  • The parameter value is not numeric, such as 10S
  • The parameter is numeric, but outside the range, such as 50
The task issues a ParameterValidationException back to the user interface for an out of range example:
throw new ParameterValidationException(
   CONFIG_PARM_KEY_NUMBER, "The numeric value must be between 1 and 50.");

Refer to the Javadoc information for additional information about methods and signatures.