This document is a plugin development kit for the Anjana Data platform.
Requirements: Java 17 · Spring Boot 3.5.x
Project Structure
|
File / Class |
Description |
Example in tot-plugin-example |
|---|---|---|
|
|
Project object model. Defines version, dependencies, and build configuration. Since v6.0.0 uses |
|
|
|
Startup configuration: port, SSL/TLS, Eureka, logging. |
|
|
|
Connection and ARI configuration. Deployed alongside the jar. |
|
|
Main class |
Annotated with |
|
|
Configuration class |
Loads properties from YAML. See Multi / Single connection pattern below. |
|
|
Controller |
Annotated with |
|
|
Services ( |
Contain all the technology integration logic. One per operation. |
|
Directory Tree
tot-plugin-example/
├── external/
│ └── application-default.yaml <- connections and ARIs
├── src/main/
│ ├── java/com/anjana/tot/plugin/example/
│ │ ├── configuration/
│ │ │ ├── ExampleMultiConnectionConfiguration.java
│ │ │ ├── ExampleUniqueConnectionConfiguration.java
│ │ │ └── ExampleTechnology.java
│ │ ├── controller/
│ │ │ └── OperationsController.java
│ │ ├── service/
│ │ │ ├── ExtractMetadataService.java
│ │ │ ├── ObjectService.java
│ │ │ ├── PermissionService.java
│ │ │ └── SampleDataService.java
│ │ └── TotPluginExampleApplication.java
│ └── resources/
│ └── application.yaml
└── pom.xml
Configuration Pattern: Multi Connection vs. Single Connection
The two strategies are mutually exclusive. One is chosen depending on whether the plugin manages a single connection or several.
|
|
Multiple connections |
Single connection |
|---|---|---|
|
Base class |
|
|
|
Example class |
|
|
|
YAML structure |
Array |
Properties directly under |
|
Technology binding |
In |
|
ExampleTechnology (implements the Technology interface) is where the technology-specific properties are declared: credentials, driverClassName, connectionTimeout, etc. Add here the fields the integration needs.
Available Operations
The controller implements the interfaces of the tot-plugin-lib library. The following table summarizes all the operations:
|
Operation |
Interface |
Endpoint |
DTOs |
When it's invoked |
|---|---|---|---|---|
|
Create group ( |
|
|
|
When creating or versioning a DSA with governed datasets |
|
Delete group ( |
|
|
|
When a DSA with governed datasets expires |
|
Remove object from a group ( |
|
|
|
When a governed dataset expires |
|
Assign user ( |
|
|
|
When a user joins a DSA with governed datasets |
|
Unassign user ( |
|
|
|
When a user withdraws from a DSA with governed datasets |
|
Edit object ( |
|
|
|
When reactivating permissions on an object that is included in a DSA again |
|
Data sampling ( |
|
|
|
When accessing the sampling tab on a governed dataset |
|
List objects ( |
|
|
|
When requesting the list of objects available in the technology |
|
Extract metadata ( |
|
|
|
When extracting metadata for a specific object of the technology |
It is recommended to implement metadataList and metadataExtract asynchronously — external technologies can introduce significant latency.
Libraries
|
Library |
What it provides |
Main path |
|---|---|---|
|
tot-lib |
Data mapping DTOs. Utilities: |
|
|
customers-lib |
Additional DTOs and typed enumerators. |
|
|
tot-plugin-lib |
Endpoint interfaces ( |
|
How to Create a Plugin
1. Parent and Dependencies
Use anjana-jdk-parent as <parent>. Common dependencies are managed by the BOM — do not declare explicit versions.
2. Minimum Configuration
With multiple connections (ExampleMultiConnectionConfiguration):
totplugin:
server:
urls:
- https://yourserver:15000/tot/
keep-alive-seconds: 60
connection:
- name: instance-1
aris:
- ari: "anja:totplugin:extract:/infra/tech/zone/"
- ari: "anja:totplugin:sample:/infra/tech/zone/"
- ari: "anja:totplugin:im:/infra/tech/zone/"
With single connection (ExampleUniqueConnectionConfiguration):
totplugin:
server:
urls:
- https://yourserver:15000/tot/
keep-alive-seconds: 60
aris:
- ari: "anja:totplugin:extract:/infra/tech/zone/"
- ari: "anja:totplugin:sample:/infra/tech/zone/"
- ari: "anja:totplugin:im:/infra/tech/zone/"
|
Property |
Description |
|---|---|
|
|
tot URL, needed to register and stay active in its registries |
|
|
Re-registration frequency in tot |
|
|
Unique connection name (multi-connection mode only) |
|
|
Triplets (infrastructure, technology, zone) with the offered functionalities: |
3. Services
The example services come empty: this is where all the technology integration logic is developed. Method names and structure can be freely adapted; what matters is that they are invoked from the controller.