@@ -236,13 +236,32 @@ public CommonParams(Map<String, String> paramsMap) throws Exception {
236
236
mapLine = new HashMap <>();
237
237
}
238
238
switch (process ) {
239
+ case "delete" :
240
+ case "status" :
241
+ case "lifecycle" :
242
+ if (!fromLine ) mapLine .put ("key" , entryParam .getValue ("key" , entryParam .getParamsMap ().containsKey ("key" ) ? "" : null ));
243
+ break ;
239
244
case "copy" :
240
245
case "move" :
241
246
case "rename" :
242
247
if (!fromLine ) mapLine .put ("key" , entryParam .getValue ("key" , entryParam .getParamsMap ().containsKey ("key" ) ? "" : null ));
243
248
indexMap .put ("toKey" , "toKey" );
244
249
mapLine .put ("toKey" , entryParam .getValue ("to-key" , entryParam .getParamsMap ().containsKey ("to-key" ) ? "" : null ));
245
250
break ;
251
+ case "stat" :
252
+ if (!fromLine ) mapLine .put ("key" , entryParam .getValue ("key" , entryParam .getParamsMap ().containsKey ("key" ) ? "" : null ));
253
+ saveFormat = entryParam .getValue ("save-format" , "tab" ).trim ();
254
+ ParamsUtils .checked (saveFormat , "save-format" , "(csv|tab|json)" );
255
+ setSaveSeparator ();
256
+ break ;
257
+ case "mime" :
258
+ if (!fromLine ) mapLine .put ("key" , entryParam .getValue ("key" , entryParam .getParamsMap ().containsKey ("key" ) ? "" : null ));
259
+ String mime = entryParam .getValue ("mime" , "" ).trim ();
260
+ if (!"" .equals (mime )) {
261
+ indexMap .put ("mime" , "mime" );
262
+ mapLine .put ("mime" , mime );
263
+ }
264
+ break ;
246
265
case "download" :
247
266
case "fetch" :
248
267
case "asyncfetch" :
@@ -298,12 +317,6 @@ public CommonParams(Map<String, String> paramsMap) throws Exception {
298
317
mapLine .put ("id" , id );
299
318
}
300
319
break ;
301
- case "stat" :
302
- if (!fromLine ) mapLine .put ("key" , entryParam .getValue ("key" ));
303
- saveFormat = entryParam .getValue ("save-format" , "tab" ).trim ();
304
- ParamsUtils .checked (saveFormat , "save-format" , "(csv|tab|json)" );
305
- setSaveSeparator ();
306
- break ;
307
320
case "qupload" :
308
321
String key = entryParam .getValue ("key" , entryParam .getParamsMap ().containsKey ("key" ) ? "" : null );
309
322
if (!fromLine ) mapLine .put ("key" , key );
@@ -315,14 +328,6 @@ public CommonParams(Map<String, String> paramsMap) throws Exception {
315
328
throw new IOException ("filepath and key shouldn't all be empty, file must be found with them." );
316
329
}
317
330
break ;
318
- case "mime" :
319
- if (!fromLine ) mapLine .put ("key" , entryParam .getValue ("key" ));
320
- String mime = entryParam .getValue ("mime" , "" ).trim ();
321
- if (!"" .equals (mime )) {
322
- indexMap .put ("mime" , "mime" );
323
- mapLine .put ("mime" , mime );
324
- }
325
- break ;
326
331
default : if (!fromLine ) mapLine .put ("key" , entryParam .getValue ("key" ));
327
332
break ;
328
333
}
0 commit comments