Plugins
OpenCDMP is built around a plugin architecture that lets you extend the platform with your own services for file export and import, repository deposit, and plan evaluation. Each plugin is an independent Spring Boot microservice that OpenCDMP calls over HTTP; once registered, it is available to users through the standard user interface.
Assets are called descriptions in the API, plugin contracts, and data model.
Plugin types
| Plugin type | Purpose | Base package |
|---|---|---|
| File transformer | Export plans and assets to custom file formats, or import from them | org.opencdmp:file-transformer-base |
| Deposit service | Deposit plans to external repositories and receive DOIs | org.opencdmp:repository-deposit-base |
| Evaluator | Assess plans and assets against standards or criteria | org.opencdmp:evaluator-base |
How plugins work
All plugin types follow the same pattern:
- Implement a client interface, which contains your business logic (
FileTransformerClient,DepositClient,EvaluatorClient). - Implement a controller interface, which exposes the REST endpoints the platform calls (
FileTransformerController,DepositController,EvaluatorController) under/api/file-transformer,/api/deposit, or/api/evaluator. - Expose a configuration endpoint, which the platform calls to discover the plugin's id and capabilities (supported formats, benchmarks, authentication methods, and so on):
GET /api/file-transformer/formats,GET /api/deposit/configuration, orGET /api/evaluator/config. - Secure the endpoints: accept only tokens from the installation's Keycloak realm with the
pluginsaudience (IDP_ISSUER_URI,SECURITY_AUDIENCE=plugins,IDP_CLAIMS_ROLES_PATH=plugins.roles). - Test it locally against a local installation; see Run and test a plugin locally.
- Register it with OpenCDMP, for the whole installation in the API service configuration (
file-transformer.sources,deposit.sources, orevaluator.sources), or for one organisation with Add plugin under Settings > Plugins. See Registering plugin services. The platform then makes the plugin available to users.
Shared data models
All plugins communicate with OpenCDMP using the Common Models package (org.opencdmp:common-models), which defines the data structures for plans, assets, and files. See Common Models for the full reference.
Plugin documentation
File transformer plugin
Build a file transformer that exports and imports plans and assets - the FileTransformerClient and FileTransformerController contract, formats, export options, template validation, and deployment
Deposit plugin
Build a deposit service that publishes plans to a repository - the DepositClient and DepositController contract, configuration, authentication, organisation settings, and deployment
Deposit preview and metadata review
The optional preview contract of deposit services - the preview descriptor, field types and widgets, stored overrides, and vocabulary search
Evaluator plugin
Build an evaluator that ranks plans and assets - the EvaluatorClient and EvaluatorController contract, benchmarks, rank results, and deployment
Common models
The common-models package shared by OpenCDMP and its plugins - plan, asset, blueprint, template, reference, file, plugin configuration, and semantics manifest models
Run and test a plugin locally
Run a plugin against the Docker example, get a plugins token with curl, call the configuration endpoint, register the plugin with a local installation, and package it as a Docker image