Creating a Project

After you install the SDK dependencies, create a project using the MATRIXX Extension Maven archetype.

The archetype is a project template, including a base Maven configuration and sample artifacts (such as code, properties, and so forth) that you can use to begin developing your Rest Services Gateway (RS Gateway) extension.

Create the project in any directory, but you must copy the manage_integration_project.py script to that directory. You can also create the project directory manually using the mvn command.

When you create a project from the MATRIXX Maven archetype, it includes the following modules:
  • Extensions — Used for common code and MATRIXX Data Container (MDC) definitions. Deployed to the RS Gateway pod.
  • RS Gateway Extension — The RS Gateway Extension module deployed to the RS Gateway pod.

Extensions Module

The Extensions module contains common MDC definitions used to auto-generate MDC classes. You can use it as a common module for any custom code that is shared across RS Gateway extensions.

MDC Definition Extensions Module Files describes the files that are in the default project. The src/main/mtx directory contains product-level configuration files that you must replace when upgrading to a new MATRIXX release.
Table 1. MDC Definition Extensions Module Files
Name Description
mtx_containers.xml This file contains all default MATRIXX Engine MDC definitions.
Important: Never edit this file.
rsgateway-mdc.xml This file contains all RS Gateway-specific MDC definitions.
Important: Never edit this file.
Custom MDC Definition Extensions Module Files describes the files that are in the default project. All Extensions module files are in the src/main/resources directory.
Table 2. Custom MDC Definition Extensions Module Files
Name Description
mdc_config_custom.xml Edit this file or create your own file to include your MATRIXX Engine extension MDC definitions.
extension-rest-mdc.xml Edit this file or create your own file to include your RS Gateway-specific extension MDCs definitions.

After including your custom MDC definitions in the editable files, building this module auto-generates all MDC classes. The other modules depend on the Extensions module.

RS Gateway Extension Module

The RS Gateway Extension module contains all RS Gateway-specific extension implementation files. It includes the REST definitions in XML format and the implementation files for each API.

RS Gateway Extension Module Files describes the files included in this module and their locations.
Table 3. RS Gateway Extension Module Files
Name Location Description
DemoQuerySubscriberConfig.java src/main/java An example REST API implementation. This example converts a subscriber object into the Demo subscriber object. The full path to the file is rsgwextension/src/main/java/com/matrixx/rsgateway/configuration.

Place your custom extension classes in this directory.

extension.xml src/main/resources/rest Contains definitions for the REST API used for auto-generation of the code. Add more APIs to this file or create new files.
application-extensions.yaml src/main/resources Edit this file to include common properties.
Unit test specific code and resources src/main/test Files used for unit testing.