132
« on: March 12, 2019, 07:07:47 AM »
See if this (albeit crude) example helps:
odServer.logon("shortrib", "admin", "password");
ODFolder folder = odServer.openFolder("Baxter Bay");
Vector<ODHit> hits = folder.search();
ODHit odHit = (ODHit)hits.get(0);
String hit = odHit.getOpenDocId();
odServer.logoff();
odServer.terminate();
odServer = new ODServer(odConfig);
odServer.initialize("TestOpenDocId");
odServer.setPort(0);
odServer.logon("shortrib", "rjrussel", "password");
folder = odServer.openFolder("Baxter Bay");
ODHit hit2 = folder.recreateHit(hit);
System.out.println("Recreated:" + hit2.getDocumentName());
Keep in mind in order for recreate hit to work the user recreating the hit MUST have permissions to the document. If that user doesn't you will still get an error.
Thanks,
RR