@@ -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 ());
0 commit comments