Wednesday, August 6, 2014

UCM: Delete a folder and all the contents inside it using RIDC

To delete a folder and all the contents inside it, using COLLECTION_DELETE_LOT service.
DataBinder serviceBinder = idcClient.createBinder();
serviceBinder.putLocal("IdcService", "COLLECTION_DELETE_LOT");
serviceBinder.putLocal("collectionselect0", "true");
serviceBinder.putLocal("fromCollectionisLink0", "0");
serviceBinder.putLocal("fromhasCollectionID0", "1");
serviceBinder.putLocal("fromdCollectionID0", "814720879757000011");//folder to delete
ServiceResponse response = idcClient.sendRequest(userContext, serviceBinder);
DataBinder responseBinder = response.getResponseAsBinder();

To delete a particular content:
DataBinder serviceBinder = idcClient.createBinder();
serviceBinder.putLocal("IdcService", "COLLECTION_DELETE_LOT");
serviceBinder.putLocal("contentselect0", "true");
serviceBinder.putLocal("fromContentisLink0", "0");
serviceBinder.putLocal("fromdDocName0", "UCM_SERVER21-012455");//dDocName to delete
ServiceResponse response = idcClient.sendRequest(userContext, serviceBinder);
DataBinder responseBinder = response.getResponseAsBinder();

No comments:

Post a Comment