See also: Writing Registry Plugins

The interface requirements for Organization Sources is considered Experimental, and may change across minor releases.

Plugin Requirements

  1. The name of the Plugin should match the format FooSource. Note this is the same format used by Organizational Identity Source Plugins, but as reliance on name formats is being removed, this should not cause conflicts with OIS Plugins.
  2. The Plugin should implement a FooSource model and a corresponding controller (FooSourcesController).
    1. This model should belongTo OrganizationSource and extend OrganizationSourceBackend, and implement the abstract functions defined in the parent model (see app/Model/OrganizationSourceBackend.php).
    2. The controller should extend SORSController.
    3. When a new Organization Source is created, a skeletal row in the corresponding foo_sources table will be created. There is no add operation or view required. The skeletal row will point to the parent Organization Source.
    4. When an Organization Source is edited, the entry point to the Plugin will be foo_source/foo_sources/edit/#. This will be called immediately after the parent Organization Source is created.
    5. Note OrganizationSource has a hasOne (ie: 1 to 1) relationship with FooSource.
    6. The table foo_sources should include a foreign key to organization_sources:id.
      1. Other tables used by the plugin should reference foo_source:id.
  3. FooSource is responsible for the implementation of the backend search and retrieval capabilities.
    1. The raw record returned by the retrieve() function should not change if the underlying backend record has not changed. Registry uses the raw record to determine when the related Organization record must be updated.
    2. The plugin must support inventory() in order for Accrual and Full Sync modes to work.
    3. See also Supported Attributes, below.
    4. Note that the Plugin configuration for FooSource will be available to the backend via $this->getConfig().
  4. Registry will automatically track the current backend data via the organization_source_records table.

Supported Attributes

The Organization Source Backend is expected to return both a raw record (directly representing the backend datasource), and a formatted record. The formatted record is expected to represent an Organization, in typical Cake array format, along with its associated Models. The Backend may return the following supported attributes:

AttributeMulti-valued?Required?Notes
AddressYesNo
ContactYesNo
EmailAddressYesNo
IdentifierYesNo
Organization.source_keyNoYesThe unique key to identify this Organization from all Organizations available in this backend
Organization.nameNoYesOrganizations do not directly support Names as a multi-valued attribute, however additional names can be stored as Identifiers of type name
Organization.descriptionNoNo
Organization.typeNoNo
Organization.scopeNoNo
Organization.logo_urlNoNo
TelephoneNumberYesNo
UrlYesNo

Example

$myData = array(
  'Organization' => array(
    'name' => 'University of Impossible Equations',
    'type' => OrganizationEnum::Academic,
    'scope' => 'impossible.edu',
    'source_key' => 'https://impossible.edu'
  ),
  // Note below here are multi-valued arrays
  'Identifier' => array(
    array(
      'identifier' => 'UIE',
      'type' => IdentifierEnum::Name,
      'status' => SuspendableStatusEnum::Active
    )
  ),
  'Url' => array(
    array(
      'mail' => 'https://impossible.edu',
      'type' => UrlEnum::Official
    )
  )
);
  • No labels