Create an OID suffix mappings descriptor for assigning OID suffixes to resource adaptor entities or profile tables either manually or from an input template. If you use an input template, substitute relevant variables in the template with the values from relevant imported properties.

Take the following template called oid-suffix-mappings.json as an example:

{
  "name": "Database Query",
  "vendor": "${dbquery.vendor}",
  "version": "${dbquery.version}",

  "resourceAdaptorEntities": [
    {
      "name": "${dbquery-ra-entity.name}",
      "oidSuffix": "${oid.products.resource-adaptors.dbquery.resource-adaptor-entities.primary}"
    }
  ]
}

To substitute the OID assignment variables in this file, use the Ant copy task in the build script to expand the properties, as shown below:

<property file="${self.oid-mappings.properties}"/>

<mkdir dir="${classes}"/>
<copy todir="${classes}/META-INF">
    <fileset dir="${src}/META-INF" includes="*.json"/>
    <filterchain>
        <expandproperties/>
    </filterchain>
</copy>

Depending on the values of the imported properties, the generated OID suffix mappings descriptor document oid-suffix-mappings.json may be as follows:

{
  "name": "Database Query",
  "vendor": "OpenCloud",
  "version": "2.2.0",

  "resourceAdaptorEntities": [
    {
      "name": "dbquery-0",
      "oidSuffix": "1"
    }
  ]
}
Previous page Next page