See also: Writing Registry Plugins
The interface requirements for Organization Sources is considered Experimental, and may change across minor releases.
Plugin Requirements
- 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. - The Plugin should implement a
FooSource
model and a corresponding controller (FooSourcesController
).- This model should
belongTo OrganizationSource
and extendOrganizationSourceBackend
, and implement the abstract functions defined in the parent model (seeapp/Model/OrganizationSourceBackend.php
). - The controller should extend
SORSController
. - When a new Organization Source is created, a skeletal row in the corresponding
foo_sources
table will be created. There is noadd
operation or view required. The skeletal row will point to the parent Organization Source. - 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. - Note
OrganizationSource
has ahasOne
(ie: 1 to 1) relationship withFooSource
. - The table
foo_sources
should include a foreign key toorganization_sources:id
.- Other tables used by the plugin should reference
foo_source:id
.
- Other tables used by the plugin should reference
- This model should
FooSource
is responsible for the implementation of the backend search and retrieval capabilities.- 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. - The plugin must support
inventory()
in order for Accrual and Full Sync modes to work. - See also Supported Attributes, below.
- Note that the Plugin configuration for
FooSource
will be available to the backend via$this->getConfig()
.
- The raw record returned by the
- 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:
Attribute | Multi-valued? | Required? | Notes |
---|---|---|---|
Address | Yes | No | |
Contact | Yes | No | |
EmailAddress | Yes | No | |
Identifier | Yes | No | |
Organization.source_key | No | Yes | The unique key to identify this Organization from all Organizations available in this backend |
Organization.name | No | Yes | Organizations do not directly support Names as a multi-valued attribute, however additional names can be stored as Identifiers of type name |
Organization.description | No | No | |
Organization.type | No | No | |
Organization.scope | No | No | |
Organization.logo_url | No | No | |
TelephoneNumber | Yes | No | |
Url | Yes | No |
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 ) ) );