CSUtils Groovy Library

The CSUtils Groovy Library provides access to the CentraSite Query Language engine from within Groovy. But, what is more, it also provides a Groovy template engine. You can use this engine to create reports, XML documents, and so on with embedded data, which is read from the CentraSite registry.

Multiple Template Engines

Groovy comes with a set of prefonfigured template engines. These are:

  • The SimpleTemplateEngine for basic plain text templates.
  • The GStringTemplateEngine, which stores templates as a writable closure. It is therefore well suited for streaming scenarious. Like the SimpleTemplateEngine, it is used for plain text templates.
  • The XmlTemplateEngine is suited for creating XML documents.

    The CSUtils Groovy Templates add an additional XmlTemplateEngine with additional possibilities like dynamic generation of elements and attributes, and better namespace processing. See the template engine description for details.

Groovy Registry Objects

The framework provides wrappers for the native JAXR registry objects. These wrappers implement an API, which closely resembles the CentraSite Query Language. For example, $ro.name would mean the value of the attribute "name", but $ro.name() would retrieve the registry objects name. Such wrappers exist for