First page Back Continue Last page Graphics

Examining the Generated Skeleton Code


Notes:

Examining the Generated Skeleton Code

The slide shows the skeleton code for the example (without the package name, import statements, or comments.). The Java class that is created implements the JboValidatorInterface interface with its three methods:

get Description(): Gets the text description of this validator

setDescription(java.lang.String description ): Sets the text description of this validator

validate(JboValidatorContext ctx): Tests the validity of the object or value as described in the validator context; this is the method that is executed when the validation occurs

The newly created class also sets the description that you entered when you defined the rule, and adds its own validateValue() method where you can add the validation code. You can replace the return statement with your own code.

After you have created a rule in this way, it is automatically registered in the project and is available for use in your business components.