Updater extension syntax

An updater extension adheres to the following syntactic conventions:

  • The extension is defined by a JSON object contained in the updaters field of the updater extension file
  • The name of the updater extension matches that of the schema definition extension for the resource that is being extended
  • The extension must have a schemaDefinition attribute that associates the updater extension with the schema definition extension
  • The extension must have a root attribute that associates the schema definition extension with a PolicyCenter entity
  • The extension must have a properties attribute to contain the extended properties
  • The name of each extended property must match that found in the associated schema definition extension
  • Each extended property must have a path attribute pointing to a PolicyCenter entity field
  • If the extended property value type supports a typekey, then it must also have a valueResolver.typeName attribute that holds a TypeKeyValueResolver URI reference

The following listing shows an updater extension for the Activity schema in the Common API. The extension associates an extended shortSubject_Ext resource property with the PolicyCenter Activity.ShortSubject entity field:

{
  . . .
  "updaters": {
    "Activity": {
      "schemaDefinition": "Activity",
      "root": "entity.Activity",
      "properties": {
        "shortSubject_Ext": {
          "path": "Activity.ShortSubject"
        }
      }
    }
  }
}
  • Activity: The name of the updater
  • schemaDefinition: A mapping to the Activity schema definition
  • root: A mapping of the Activity schema definition to the Activity entity in PolicyCenter
  • shortSubject_Ext: A property name, as defined in the schema definition
  • path: A path that associates the extended property with the Activity.ShortSubject entity field. Values can be chained. For example, the path for the display name of an account contact is AccountContact.Contact.DisplayName.

If the property value type of the extended property in the schema definition extension is TypeKeyReference, then in the updater extension that property must include a valueResolver attribute that sets typeName to TypeKeyValueResolver:

{
  . . .
  "updaters": {
    "Activity": {
      "schemaDefinition": "Activity",
      "root": "entity.Activity",
      "properties": {
        "activityClass_Ext": {
          "path": "Activity.ActivityClass",
          "valueResolver": {
            "typeName": "TypeKeyValueResolver"
          }
        }
      }
    }
  }
}