I have been working on trying to call the standard D2 delete operation from a custom plugin with no real luck.
To be a bit more accurate I need to be able to reproduce the exact steps that D2 is performing a document is deleted.
I tried calling the D2DestroyService with the following code:
new D2DestroyService().destroy(context, object.getObjectId().toString(), new ArrayList<Attribute>());
This works in the sense that the document is deleted, however it doesn't do exactly the same things as when I delete a document using the D2 GUI.
The difference I have noticed is that the document does not appear in the wastebasket after I delete it using the D2DestroyService.
I also tried using a IDfDeleteOperation but I got the same result.
So the question is:
Is there any way of calling the exact same delete function that D2 is using?
Or is it perhaps a servermethod I could call? I did find com.emc.d2.api.methods.D2DeleteObjectMethod but after looking into it(and decompiling it) it seems as if it is just using IDfSysObject.destroy(), which has the same problem as the D2DestroyService.
To clarify I want to mimic the behaviour of "Show dialog with manager
"DestroyManager\""