discoverygarden / dgi_actions
Integration with external identifier service providers.
Installs: 1 055
Dependents: 2
Suggesters: 0
Security: 0
Stars: 2
Watchers: 9
Forks: 6
Open Issues: 3
Type:drupal-module
pkg:composer/discoverygarden/dgi_actions
Requires
- islandora/islandora: ^1 || ^2
README
Introduction
Provides a framework to support minting and deletion of identifiers either locally or with external services.
Requirements
This module requires the following modules/libraries:
Installation
Install as usual, see this for further information.
Configuration
This module and its submodules come with no configuration out of the box. Below
is the steps for configuring the included dgi_actions_ark_identifier.
Entity configuration
The main configuration overview for all entities used within the module is
located at admin/config/dgi_actions.
Data profile configuration
Data profile entities contain data used when building up a request to a service. These values are retrieved from the entity and are passed along with an HTTP request. EZID provides a good example of how this is used.
- Create a new data profile:
admin/config/dgi_actions/data_profile/add. - Give the data profile a name.
- Select the entity and bundle for which the data will be retrieved from. In this example choose
nodeandRepository Item. - Select the
DataProfileplugin that's being used. In this example chooseERC. - For the three
ERCfields choose which fields to map from. - Save the data profile.
Service data configuration
Service data entities contain configuration used for interacting with external APIs.
- Create a new service data:
admin/config/dgi_actions/service_data/add. - Give the service data a name.
- Select the
ServiceDataplugin that's being used. In this example chooseEZID. - Fill in the required fields that is provided by the
EZIDplugin. - Save the service data.
Identifier configuration
Identifiers tie everything together. In the event ServiceData and DataProfiles are being used they
store references to the configured entities from above. Similarly, they store where the minted identifier is going to be placed.
- Create a new identifier:
admin/config/dgi_actions/identifier/add. - Give the identifier a name.
- Select the entity and bundle for which the data will be stored on. In this example choose
nodeandRepository Item. - Select the field in which the identifier will be stored in. For the example choose whichever field you want.
- Choose the
ServiceDatabeing used for the request from the dropdown if needed. For the example choose the one created above. - Choose the
DataProfilebeing used for the request from the dropdown if needed. For the example choose the one created above. - Save the identifier.
Action configuration
An action is required for each identifier being minted and optionally deleted.
- Create a new action:
admin/config/system/actions. - Under
Create an advanced actionchoose either the mint or delete action to be configured. For the example chooseMint ARK EZID Identifier. - Choose the identifier entity that the action will trigger and save.
- Repeat the above and instead choose
Delete ARK EZID Identifierand save.
Context configuration
Drupal's Context module is used in conjunction with conditions and entity hooks to handle minting and deleting with a custom condition to check if a entity already has a persistent identifier.
- Create a new context:
admin/structure/context/add. - Give it a name and optionally fill out the other fields and save.
- Configure the conditions required for an identifier to be minted. For the example create two conditions:
Node BundleandEntity Has Persistent Identifier. Configure theNode Bundlecondition to look for theRepository Itembundle andContent from hook. Configure theEntity Has Persistent Identifiercondition to use theIdentifiercreated above andContent from hook. Negate this condition such that it will only mint if it does not already exist. - Choose require all conditions.
- Add a reaction choose
Mints an identifier. - Under
entitychoose whatever the mint action created above was called. - Repeat the above and instead choose the
Deletes an identifierreaction and conditions that satsify deletion. Normally this would be just removing the negation onEntity Has Persistent Identifier.
New Integrations
To create a new identifier minting integration at least a MintIdentifier action is required.
Optionally a DataProfile plugin, a ServiceDataType plugin and a DeleteIdentifer action can be created if required.
Troubleshooting/Issues
Having problems or solved a problem? Contact discoverygarden.
Maintainers/Sponsors
Current maintainers:
Development
If you would like to contribute to this module, please check out the helpful Documentation, Developers section on Islandora.ca and contact discoverygarden.