Read this documents to learn how groovy language can be used to build internal DSL:

Purpose

DSL was created to ease the management of cristal-ise resources, especially the generation and maintenance of XML files. Currently it can generate and update all files required to build and bootstrap a module, but ultimately it can replace the complete boostrap mechanism. Also it can be used to generate XMLs and resource Items for unit and functional tests.