Skip to content

Commit 85295c4

Browse files
committed
remove debug
1 parent 1316f79 commit 85295c4

6 files changed

Lines changed: 0 additions & 27 deletions

File tree

sdm/src/test/java/integration/com/sap/cds/sdm/utils/CmisDocumentHelper.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public static void createDocumentInCmis(String cmisName, String filePath, String
3535
folderLine != null && folderLine.contains(": ")
3636
? folderLine.substring(folderLine.lastIndexOf(": ") + 2).trim()
3737
: folderLine;
38-
System.out.println("Resolved parent folder object ID: " + parentFolderObjectId);
3938

4039
int exitCode = ShellScriptRunner.run(CREATE_SCRIPT, cmisName, filePath, parentFolderObjectId);
4140
if (exitCode != 0) {
@@ -62,7 +61,6 @@ public static void deleteDocumentFromCmis(String entityId, String fileName) {
6261
folderLine != null && folderLine.contains(": ")
6362
? folderLine.substring(folderLine.lastIndexOf(": ") + 2).trim()
6463
: folderLine;
65-
System.out.println("Resolved parent folder object ID: " + parentFolderObjectId);
6664

6765
// Step 2: resolve the document object ID by filename inside the parent folder
6866
String docLine =
@@ -72,7 +70,6 @@ public static void deleteDocumentFromCmis(String entityId, String fileName) {
7270
docLine != null && docLine.contains(": ")
7371
? docLine.substring(docLine.lastIndexOf(": ") + 2).trim()
7472
: docLine;
75-
System.out.println("Resolved document object ID: " + documentObjectId);
7673

7774
// Step 3: delete the document
7875
int deleteExitCode =
@@ -102,7 +99,6 @@ public static void readDocumentFromCmis(String entityId, String fileName, String
10299
folderLine != null && folderLine.contains(": ")
103100
? folderLine.substring(folderLine.lastIndexOf(": ") + 2).trim()
104101
: folderLine;
105-
System.out.println("Resolved parent folder object ID: " + parentFolderObjectId);
106102

107103
// Step 2: resolve the document object ID by filename inside the parent folder
108104
String docLine =
@@ -112,7 +108,6 @@ public static void readDocumentFromCmis(String entityId, String fileName, String
112108
docLine != null && docLine.contains(": ")
113109
? docLine.substring(docLine.lastIndexOf(": ") + 2).trim()
114110
: docLine;
115-
System.out.println("Resolved document object ID: " + documentObjectId);
116111

117112
// Step 3: read/download the document
118113
int exitCode = ShellScriptRunner.run(READ_SCRIPT, documentObjectId, outputPath);
@@ -134,35 +129,26 @@ public static void readDocumentFromCmis(String entityId, String fileName, String
134129
*/
135130
public static String readDocumentMetadataFromCmis(String entityId, String fileName) {
136131
try {
137-
System.out.println(
138-
"[DEBUG] readDocumentMetadataFromCmis: entityId=" + entityId + ", fileName=" + fileName);
139-
140132
// Step 1: resolve the parent folder object ID from entityId__attachments
141133
String folderName = entityId + "__attachments";
142-
System.out.println("[DEBUG] Looking up folder: " + folderName);
143134
String folderLine = ShellScriptRunner.runAndCaptureOutput(GET_OBJECT_ID_SCRIPT, folderName);
144135
String parentFolderObjectId =
145136
folderLine != null && folderLine.contains(": ")
146137
? folderLine.substring(folderLine.lastIndexOf(": ") + 2).trim()
147138
: folderLine;
148-
System.out.println("[DEBUG] Resolved parent folder object ID: " + parentFolderObjectId);
149139

150140
// Step 2: resolve the document object ID by filename inside the parent folder
151-
System.out.println(
152-
"[DEBUG] Looking up document: " + fileName + " in folder: " + parentFolderObjectId);
153141
String docLine =
154142
ShellScriptRunner.runAndCaptureOutput(
155143
GET_OBJECT_ID_SCRIPT, fileName, parentFolderObjectId, "cmis:document");
156144
String documentObjectId =
157145
docLine != null && docLine.contains(": ")
158146
? docLine.substring(docLine.lastIndexOf(": ") + 2).trim()
159147
: docLine;
160-
System.out.println("[DEBUG] Resolved document object ID: " + documentObjectId);
161148

162149
// Step 3: fetch metadata
163150
String metadata =
164151
ShellScriptRunner.runAndCaptureOutput(GET_METADATA_SCRIPT, documentObjectId);
165-
System.out.println("[DEBUG] Document metadata retrieved successfully");
166152
return metadata;
167153
} catch (Exception e) {
168154
fail("Failed to read document metadata from CMIS: " + e.getMessage());

sdm/src/test/java/integration/com/sap/cds/sdm/utils/create.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
echo "test"
54

65
# ---------------------------------------------------------------------------
76
# create.sh — Upload a file to SAP Document Management Service via CMIS API
@@ -64,7 +63,6 @@ for var in CMIS_URL defaultRepositoryID authUrl cmisClientID cmisClientSecret us
6463
done
6564

6665
# --- Obtain OAuth2 access token (password grant) ---
67-
echo "Fetching OAuth2 token..."
6866
TOKEN_RESPONSE=$(curl -s -X POST "${authUrl}/oauth/token" \
6967
--data-urlencode "grant_type=password" \
7068
--data-urlencode "client_id=${cmisClientID}" \
@@ -106,7 +104,6 @@ CURL_ARGS=(
106104
-F "filename=@${FILE_PATH};type=${MIME_TYPE}"
107105
)
108106

109-
echo "Creating document '${CMIS_NAME}' in repository '${defaultRepositoryID}'..."
110107
RESPONSE=$(curl "${CURL_ARGS[@]}")
111108

112109
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)

sdm/src/test/java/integration/com/sap/cds/sdm/utils/delete.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ for var in CMIS_URL defaultRepositoryID authUrl cmisClientID cmisClientSecret us
5757
done
5858

5959
# --- Obtain OAuth2 access token (password grant) ---
60-
echo "Fetching OAuth2 token..."
6160
TOKEN_RESPONSE=$(curl -s -X POST "${authUrl}/oauth/token" \
6261
--data-urlencode "grant_type=password" \
6362
--data-urlencode "client_id=${cmisClientID}" \

sdm/src/test/java/integration/com/sap/cds/sdm/utils/get-metadata.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ for var in CMIS_URL defaultRepositoryID authUrl cmisClientID cmisClientSecret us
5656
done
5757

5858
# --- Obtain OAuth2 access token (password grant) ---
59-
echo "Fetching OAuth2 token..." >&2
6059
TOKEN_RESPONSE=$(curl -s -X POST "${authUrl}/oauth/token" \
6160
--data-urlencode "grant_type=password" \
6261
--data-urlencode "client_id=${cmisClientID}" \
@@ -77,7 +76,6 @@ fi
7776
# --- Fetch object properties via CMIS browser binding ---
7877
CMIS_ENDPOINT="${CMIS_URL}browser/${defaultRepositoryID}/root?objectId=${OBJECT_ID}&cmisselector=object"
7978

80-
echo "Fetching metadata for object '${OBJECT_ID}'..." >&2
8179

8280
RESPONSE=$(curl -s -w "\n%{http_code}" \
8381
-X GET "$CMIS_ENDPOINT" \

sdm/src/test/java/integration/com/sap/cds/sdm/utils/get-object-id.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ for var in CMIS_URL defaultRepositoryID authUrl cmisClientID cmisClientSecret us
6262
done
6363

6464
# --- Obtain OAuth2 access token (password grant) ---
65-
echo "Fetching OAuth2 token..."
6665
TOKEN_RESPONSE=$(curl -s -X POST "${authUrl}/oauth/token" \
6766
--data-urlencode "grant_type=password" \
6867
--data-urlencode "client_id=${cmisClientID}" \
@@ -81,15 +80,12 @@ if [[ -z "$ACCESS_TOKEN" ]]; then
8180
fi
8281

8382
# --- Execute CMIS query to find the folder by name ---
84-
# The CMIS Browser Binding query endpoint is the repository URL (no /root).
8583
QUERY_URL="${CMIS_URL}browser/${defaultRepositoryID}"
8684

8785
if [[ -n "${PARENT_FOLDER_ID}" ]]; then
8886
CMIS_QUERY="SELECT cmis:objectId FROM ${CMIS_TYPE} WHERE cmis:name = '${CMIS_NAME}' AND IN_FOLDER('${PARENT_FOLDER_ID}')"
89-
echo "Searching for ${CMIS_TYPE} '${CMIS_NAME}' inside folder '${PARENT_FOLDER_ID}'..."
9087
else
9188
CMIS_QUERY="SELECT cmis:objectId FROM ${CMIS_TYPE} WHERE cmis:name = '${CMIS_NAME}'"
92-
echo "Searching for ${CMIS_TYPE} '${CMIS_NAME}' in repository..."
9389
fi
9490
RESPONSE=$(curl -s -w "\n%{http_code}" \
9591
-X GET "${QUERY_URL}" \
@@ -108,7 +104,6 @@ if [[ "$HTTP_CODE" != "200" ]]; then
108104
fi
109105

110106
# --- Parse the objectId from the JSON response ---
111-
# The response is a CMIS query result; each entry has cmis:objectId.value
112107
OBJECT_ID=$(echo "$BODY" \
113108
| grep -o '"cmis:objectId"[^}]*"value":"[^"]*"' \
114109
| head -1 \

sdm/src/test/java/integration/com/sap/cds/sdm/utils/read.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ for var in CMIS_URL defaultRepositoryID authUrl cmisClientID cmisClientSecret us
5656
done
5757

5858
# --- Obtain OAuth2 access token (password grant) ---
59-
echo "Fetching OAuth2 token..."
6059
TOKEN_RESPONSE=$(curl -s -X POST "${authUrl}/oauth/token" \
6160
--data-urlencode "grant_type=password" \
6261
--data-urlencode "client_id=${cmisClientID}" \
@@ -77,7 +76,6 @@ fi
7776
# --- Build the CMIS browser endpoint URL for content stream ---
7877
CMIS_ENDPOINT="${CMIS_URL}browser/${defaultRepositoryID}/root?objectId=${OBJECT_ID}&cmisselector=content"
7978

80-
echo "Reading document '${OBJECT_ID}'..."
8179

8280
if [[ -n "${OUTPUT_PATH}" ]]; then
8381
# Download to file

0 commit comments

Comments
 (0)