Data Source Extensions

The Widget Framework Data Source component includes a range of different query types that you can use to retrieve items from the Content Engine. If these predefined query types are insufficient for your needs, you can extend the data source by making custom query types of your own.

Once a custom query type has been correctly defined, it can be used in exactly the same way as a built-in query type: it appears as an option in the +Add query dialog displayed by a Data Source Query tab list, and adds a collapsible form to the Query tab if selected, and can be combined with other standard and custom query types to create complex queries if required. (See Queries for a description of the standard query user interface.)

Making custom queries requires Java programming skills and involves the following tasks:

  1. Create a query type definition. A query type definition is an XML file containing a complete description of the query and its user interface.

  2. Package and deploy the query type definition.

  3. Create a handler for the query type. A handler is a Java class that extends the com.escenic.framework.datasource.fetcher.impl.AbstractFetcher interface.

  4. Compile, package and deploy your handler class.

  5. Create various .properties files and add them to one of your configuration layers. These configuration layer files are used to:

    • Register the query type definitions you have created

    • Register the handler classes you have created and associate them with correct query types

    • Define additional aspects of the query type user interface such as labels, enumeration options and look-up services