sap-cap-sdm-plugin
A CAP Node.js plugin that maps annotated CDS entities to SAP Document Management and exposes CMIS and repository-administration clients, in an early release.
Facts
Where it sits
Who is behind it
In the atlas: maintains 1, contributes to 1, wrote 1@vneeciousmaintainerKazuhiko TakataContributes to this
In the atlas: contributes to 1, wrote 3@kaztakataLochner LouwContributes to this
In the atlas: contributes to 1@llouw2 contributors
Before choosing this
Signals
RepositoryArchivedThe declared repository is archived
GitHub reports the repository as archived. The package may remain installable, but its source is no longer open for normal maintenance.
Conditions
LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
- § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
- § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
- § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
PracticalFunctional boundary
For versioned or thumbnail-enabled repositories, or bulk upload and download, the README labels this an “early release” and lists those features as unsupported.
What it declares
Every artifact
- Type
- CDS plugin
- Origin
- Independently maintained
As a CDS plugin
- Declared for
- ^7.6.3
- Distributed through
- npm
For attachments
- Supports
- Versioned repositories
- Storage target
- SAP Document Management via destination and repository ID
Connections
Storing uploaded files next to the record they belong to
APIs and a UI5 component for document management in apps
Download
Install
npm add sap-cap-sdm-pluginDerived from the package name. No recipe recorded; the README has the configuration.
Learn more
- Presenting sap-cap-sdm-plugin: Effortless Integration Between CAP (Node.js) and DMSPresenting sap-cap-sdm-plugin: Effortless Integration Between CAP (Node.js) and DMSThe author's introduction of the plugin, and unusually clear about its lineage: the idea came from a post about cds.plugins whose example did nothing more than append an emoji to annotated properties, and the groundwork was an earlier library, sap-cloud-cmis-client, that this builds on. Worth reading for how a plugin gets conceived as much as for what it does with Document Management Service.published 2023-10-02Vinícius Barrionuevo, SAP Community
Where it sits in your app
Download
README
quoted from vneecious/sap-cap-sdm-plugin under MIT, readSAP CAP SDM Plugin
A plugin made for SAP Cloud Application Programming (CAP) projects, aimed at effortless integration with SAP Document Management Service (SDM). Achieve smooth connections in a 'CAP-ish' style, solely utilizing CDS Annotations. This makes your DMS integrations simpler and more intuitive.
Project Overview
sap-cap-sdm-plugin is a CDS plugin that provides integration to the SAP Document Management service specifically for CAP projects.
Requirements
To use the all-in-one features provided by this plugin, you'll need a paid instance of the SAP Document Management service.
Installation & Setup
1. Installation
Install the plugin using npm with the following command:
npm install sap-cap-sdm-plugin
2. Configuration
Include the plugin in the cds.requires section of your package.json:
"cds": {
"requires": {
"sap-cap-sdm-plugin": {
"impl": "sap-cap-sdm-plugin",
"settings": {
"destination": "<YOUR_SDM_DESTINATION_NAME>",
"repositoryId": "<YOUR_REPOSITORY_ID>"
}
}
}
},
3. Entity Creation
Set up your entity with the @Sdm.Entity annotation. Link your entity properties to CMIS properties using the @Sdm.Field annotations:
service SampleService {
@cds.persistence.skip
@Sdm.Entity
entity Files {
key id : String @Sdm.Field : { type : 'property', path : 'cmis:objectId' };
name : String @Sdm.Field : { type : 'property', path : 'cmis:name' };
content : LargeBinary @Core.MediaType : contentType @Core.ContentDisposition.Filename : name;
contentType : String @Core.IsMediaType
@Sdm.Field : { type : 'property', path : 'cmis:contentStreamMimeType' };
createdBy : String @Sdm.Field : { type : 'property', path : 'cmis:createdBy' };
creationDate : Date @Sdm.Field : { type : 'property', path : 'cmis:creationDate' };
}
}
4. Get Started
After setting up, check your configuration to make sure everything is okay.
Additional Features
- File URL
Obtain a direct URL to the document by specifying type: 'link' within the @Sdm.Field annotation.
url: String @Sdm.Field : { type : 'link' };
- CMIS Client
If the entity annotations don't meet your needs, you can use the CMIS Client to implement your own logic.
This service follows the specs of SAP Document Management Service, Integration Options - CMIS from SAP Business Accelerator Hub.
Usage:
const client = await cds.connect.to('cmis-client');
// create a folder in root
await client
.createFolder('your_repository_id', 'folder_name')
.execute(destination);
Check test/cmis for more examples.
- SDM Administrative Operations
There's also a service for admin tasks, like adding a new repository. This service comes from the Document Management Service, Integration Options - AdminAPI.
Usage:
const admin = await cds.connect.to('sdm-admin');
// add a new repository
await admin.onboardARepository({
repository: {
displayName: 'sdm-plugin',
description: 'sdm-plugin',
repositoryType: 'internal',
isVersionEnabled: 'false',
},
});
Check test/admin for more examples.
Limitations
This is an early release, so some SAP DMS features are not yet supported, including:
- Repositories with
isVersionEnabledset to true; - Repositories with
isThumbnailEnabledset to true; - Bulk upload;
- Bulk download;
History
Others providing
Compare all 9 on the Attachments page →- SAP Document Management service, integration optionSAP Document Management service, integration optionA BTP service of APIs and a reusable UI5 component for adding document management, with folders, versions and status, to a business application over SAP's repository or a CMIS-compliant one.sap official, btpAPIs and a UI5 component for document management in apps
- cap-attachments-pluscap-attachments-plusA CAP Node.js attachments plugin with an Attachments aspect and a Fiori elements upload facet, storing content in the database locally or in AWS, Azure or GCP through a BTP destination.independent, capCAP Node.js attachments plugin with database or cloud storage
- com.sap.cds:cds-feature-attachmentscom.sap.cds:cds-feature-attachmentsA CAP Java attachments package that adds an Attachments aspect and stores content in the database by default, or in AWS, Azure or Google Object Store through a separate module.sap official, capCAP Java attachments with database storage and an Object Store module
- com.sap.cds:sdmcom.sap.cds:sdmA CAP Java plugin that stores attachments in an SAP Document Management repository through an Attachments aspect, with draft handling and direct creation on active entities; versioned repositories are excluded.sap official, capCAP Java plugin for attachments in SAP Document Management
- @cap-js/attachments@cap-js/attachmentsAn official CAP Node.js plugin for attachment handling, with local database storage and AWS S3, Azure Blob or GCP Object Store integration.sap official, capCAP Node.js attachments with database, S3, Azure or GCP storage
- @cap-js/sdm@cap-js/sdmStores attachments in an SAP Document Management repository instead of a bucket, for the case where the documents have to live in the system of record.sap official, capCAP attachments stored in an SAP Document Management repository
- @sap/cds@sap/cdsThe CAP Node.js runtime, which compiles the CDS model, serves the services declared in it, answers generic requests before any handler runs, and loads every cds-plugin.sap official, capCAP Node.js runtime
- @tklein1801/cap-js-attachments@tklein1801/cap-js-attachmentsA CAP Node.js attachments plugin with a draft-based upload table, Object Store integration and configurable malware scanning for the files that are uploaded.independent, capCAP Node.js attachments plugin with Object Store and malware scanning
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Flavors
“Include the plugin in the `cds.requires` section of your `package.json`:” — vneecious/sap-cap-sdm-plugin — README
Contributors
History in the atlas
- Maps CDS entity fields to CMIS properties with @Sdm.Entity and @Sdm.Field. It exposes CMIS and repository-administration clients for operations beyond those annotations.
- Connects a CAP project to SAP Document Management, written before the official @cap-js/sdm existed and built on the author's earlier CMIS client.
- First seen.
For your agent
- Ref
artifact:vneecious-sap-cap-sdm-plugin- JSON
- /artifacts/vneecious-sap-cap-sdm-plugin.json
- MCP
- Connecting an agent