Conversation
Everything works in this commit including SDM flow except inserting into DB
everything works here, but method is directly updating into db
pom.xml
Outdated
|
|
||
| <properties> | ||
| <revision>1.4.2-SNAPSHOT</revision> | ||
| <revision>1.0.0-RC1</revision> |
rishikunnath2747
left a comment
There was a problem hiding this comment.
SDMServiceGenericHandler is still required?
| /** | ||
| * @return {@code true} if the user flow is used, {@code false} otherwise | ||
| */ | ||
| Boolean getSystemUser(); |
There was a problem hiding this comment.
What is this used for?
There was a problem hiding this comment.
This is to support named user and technical user flow
Yes, if customers want to use oData call for copying attachments, they can call ServiceName.copyAttachment. So for that it is needed. I will update readMe as well in this PR |
README.md
Outdated
| This plugin provides helper method to copy attachments from one entity to another. Copy attachments operation can also be triggered using OData API call. | ||
|
|
||
|
|
||
| Refer the below example of copyAttachment method usage. |
There was a problem hiding this comment.
You can describe a little more on the helper method usage. For example,
AttachmentService instance can be used to call copyAttachments method. This method expects an object of CopyAttachmentInput which requires new entity's Id (up__Id), the attachments facet name and the list of objectIds corresponding to attachments that are to be copied. Refer the below example for the usage of copyAttachment method.
README.md
Outdated
|
|
||
| ## Support for copy attachments | ||
|
|
||
| This plugin provides helper method to copy attachments from one entity to another. Copy attachments operation can also be triggered using OData API call. |
There was a problem hiding this comment.
This plugin provides capability to copy attachments from one entity to another. This capability will copy attachments metadata on CAP as well as actual content on the SAP Document Management service repository. This feature can be used in following two ways.
README.md
Outdated
| new CopyAttachmentInput(up__ID, facet, objectIds); | ||
| attachmentService.copyAttachments(copyEventInput, isSystemUser); | ||
| ``` | ||
| Refer the below example of copyAttachment OData API usage. |
There was a problem hiding this comment.
You can describe a little more on the OData API method usage. For example,
Attachments service endpoint URL can be used with suffix /<Service_name>.copyAttachments . This request expects the following request body:
{
"up__ID" : "<up__ID>", // ID of the new entity
"objectIds" : "abc","xyz" // objectIds corresponding to attachments that are to be copied
}
Refer the below example for the usage of copyAttachments OData API.
|
Readme looks good. |
Describe your changes
As an application developer, I want capability in plugin to copy attachments from one entity to another, so that I can easily generate new entities using existing entity as a template without copying individual attachments.
Any documentation
https://wiki.one.int.sap/wiki/display/sapecm/%28NEXUS%29+Copy+Attachments
Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Upload Screenshots/lists of the scenarios tested
Create an entity upload 3 attachment, Create another entity, copy all the attachments from 1st entity to this entity.
Duplicate error: Create an entity upload 3 attachment, Create another entity, upload one attachment which was present in 1st entity. copy all the three attachments from 1st entity => Nameconstarint error will be thrown and attachments created as part of copy is deleted.
Not found error: Create an entity upload 3 attachment, Create another entity, copy all the three attachments from 1st entity by adding objectIds although 1 objectId is incorrect. => objectNot found error will be thrown and all the documents and folders created in SDM is deleted.