Skip to content

Commit abd8dcc

Browse files
updated logs
1 parent fece850 commit abd8dcc

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

sdm/src/main/java/com/sap/cds/sdm/service/SDMServiceImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,16 +507,15 @@ public int deleteDocument(String cmisaction, String objectId, String user) {
507507
// Add additional form fields
508508
builder.addTextBody("cmisaction", cmisaction, ContentType.TEXT_PLAIN);
509509
builder.addTextBody("objectId", objectId, ContentType.TEXT_PLAIN);
510-
System.out.println("Marking attachment IMPL BUILDER SDM @123" + builder);
511510
HttpEntity multipart = builder.build();
512511
deleteDocumentRequest.setEntity(multipart);
513-
System.out.println("Marking attachment IMPL DELETEDOCS SDM @123" + deleteDocumentRequest);
512+
System.out.println("Marking attachment IMPL DELETEDOCS SDM @123 -> " + deleteDocumentRequest);
514513
try (var response = (CloseableHttpResponse) httpClient.execute(deleteDocumentRequest)) {
515514
System.out.println(
516-
"Marking attachment IMPL CODE SDM @123" + response.getStatusLine().getStatusCode());
515+
"Marking attachment IMPL CODE SDM @123 -> " + response.getStatusLine().getStatusCode());
517516
return response.getStatusLine().getStatusCode();
518517
} catch (IOException e) {
519-
System.out.println("Marking attachment IMPL CATCH SDM @123" + e.getMessage());
518+
System.out.println("Marking attachment IMPL CATCH SDM @123 -> " + e.getMessage());
520519
throw new ServiceException(SDMConstants.getGenericError("delete"));
521520
}
522521
}

sdm/src/main/java/com/sap/cds/sdm/service/handler/SDMAttachmentsServiceHandler.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,25 +70,24 @@ public void createAttachment(AttachmentCreateEventContext context) throws IOExce
7070
public void markAttachmentAsDeleted(AttachmentMarkAsDeletedEventContext context)
7171
throws IOException {
7272
String[] contextValues = context.getContentId().split(":");
73-
System.out.println("Marking attachment INNER CONTEXTVALUES SDM @123" + contextValues);
7473
if (contextValues.length > 0 && !(contextValues[0].equalsIgnoreCase("null"))) {
7574
String objectId = contextValues[0];
7675
String folderId = contextValues[1];
7776
String entity = contextValues[2];
7877
// check if only attachment exists against the folderId
7978
List<CmisDocument> cmisDocuments =
8079
dbQuery.getAttachmentsForFolder(entity, persistenceService, folderId, context);
81-
System.out.println("Marking attachment INNER CMISDOCUMENTS SDM @123" + cmisDocuments);
80+
System.out.println("Marking attachment INNER CMISDOCUMENTS SDM @123 -> " + cmisDocuments);
8281
if (cmisDocuments.isEmpty()) {
83-
System.out.println("Marking attachment INNER EMPTY SDM @123" + cmisDocuments);
82+
System.out.println("Marking attachment INNER EMPTY SDM @123");
8483
// deleteFolder API
8584
sdmService.deleteDocument("deleteTree", folderId, context.getDeletionUserInfo().getName());
86-
System.out.println("Marking attachment INNER EMPTY DELETED SDM @123" + contextValues);
85+
System.out.println("Marking attachment INNER EMPTY DELETED SDM @123");
8786
} else {
8887
if (!isObjectIdPresent(cmisDocuments, objectId)) {
89-
System.out.println("Marking attachment INNER PRESENT SDM @123" + contextValues);
88+
System.out.println("Marking attachment INNER PRESENT SDM @123 ->" + objectId);
9089
sdmService.deleteDocument("delete", objectId, context.getDeletionUserInfo().getName());
91-
System.out.println("Marking attachment INNER PRESENT DELETED SDM @123" + contextValues);
90+
System.out.println("Marking attachment INNER PRESENT DELETED SDM @123");
9291
}
9392
}
9493
}

0 commit comments

Comments
 (0)