
sap-cap-sdm-plugin
, a plugin designed to streamline the integration between CAP (Node.js) and DMS (Document Management Service).cds.plugins
. In his example, Daniel creates a custom annotation that appends an emoji to the end of the text for properties that are annotated with it. Although simplistic, his example gave me some ideas.sap-cap-sdm-plugin
, I conceived the sap-cloud-cmis-client
library, aiming to streamline the integration between CAP/cloud-sdk projects and DMS on Cloud Foundry. Although useful, it fell short of providing a truly effortless experience for developers, which prompted me to explore this relatively new possibility.@SDM.Entity
and @SDM.Field
, while the plugin would handles the technical details in the background.sap-cap-sdm-plugin
came into existence.npm i sap-cap-sdm-plugin
"cds": {
"requires": {
"sap-cap-sdm-plugin": {
"impl": "sap-cap-sdm-plugin",
"settings": {
"destination": "<YOUR_SDM_DESTINATION_NAME>",
"repositoryId": "<YOUR_REPOSITORY_ID>" // Optional. Remove if you have only one repository.
}
}
}
}
destination
related to the DMS service. If you have multiple repositories, you can optionally specify the repositoryId
you want to use."cds": {
"requires": {
"sap-cap-sdm-plugin": {
"impl": "sap-cap-sdm-plugin",
"[development]": { // development profile
"settings": {
"destination": "<YOUR_SDM_DESTINATION_NAME>",
"repositoryId": "123"
}
},
"[production]": { // production profile
"settings": {
"destination": "<YOUR_SDM_DESTINATION_NAME>",
"repositoryId": "456"
}
}
}
}
}
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' };
}
}
sap-cap-sdm-plugin
is efficient for a majority of scenarios, it has its limitations, like not supporting versioned repositories, thumbnail generation, among others. I’m on it and looking forward to enhancing its capabilities. Your feedback is invaluable, so don’t hesitate to share your thoughts or seek assistance on GitHub.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |