Aprimo
The aprimo module lets editors search and import digital assets from an Aprimo DAM instance through Brightspot's federated search.
Dependencies
Depends on db-http and Aprimo's DAM REST API (/api/core/search/records), authenticated with an OAuth2 client-credentials token.
Installation
- Maven
- Gradle
- Gradle (Kotlin DSL)
<!-- Requires Brightspot 5.0 or later. -->
<dependency>
<groupId>com.brightspot.dbhttp</groupId>
<artifactId>aprimo</artifactId>
<version>1.0.0</version>
</dependency>
// Requires Brightspot 5.0 or later.
implementation 'com.brightspot.dbhttp:aprimo:1.0.0'
// Requires Brightspot 5.0 or later.
implementation("com.brightspot.dbhttp:aprimo:1.0.0")
API reference
com.psddev.aprimo.AprimoDatabase
Extends HttpDatabase. Builds an Aprimo search expression from the query's keywords, file-type filter, and any account-level custom search expressions, and dispatches it to Aprimo's search API.
com.psddev.aprimo.AprimoAsset
Extends ExternalItem.
| Field | Type | Description |
|---|---|---|
aprimoId | String | The Aprimo asset Id. |
title | String | The asset's display title. |
description | String | The asset description. |
previewUrl | String | A preview image URL (falls back to publicUrl for SVG assets). |
publicUrl | String | The asset's public URL. |
dateAdded | Date | When the asset was added to Aprimo. |
dateModified | Date | When the asset was last modified in Aprimo. |
categories | List<String> | Aprimo categories assigned to the asset. |
keywords | List<String> | Aprimo keywords assigned to the asset. |
fileType | FileType | The asset's file type, grouped into image, document, or video. |
Configuration
Credentials are stored on com.psddev.aprimo.AprimoApiClient (domain, clientId, clientSecret, plus a computed damDomain and a cached, hidden accessToken), referenced from AprimoSettings, a Modification<SiteSettings> shown under Site Settings > Integrations > Aprimo. The domain field must end in .aprimo.com and must not already contain .dam..
Configuring the API client on the Global site makes imported assets available to every site, since they have no site owner. Configuring it on a specific site scopes imported assets to that site.
A persistent AprimoSearch record on the API client can carry custom search expressions that are AND-combined with every editor's search, in addition to the file-type filter and free-text keyword search.
Extending the plugin
The module doesn't ship a content type for imported assets. To let editors create one from search results, extend AprimoAssetConverter<T> and implement createImage, createDocument, and createVideo—it dispatches to whichever method matches the asset's FileType. Have the target content type implement the Aprimo interface so the converter can store the source aprimoId on it for traceability.