This article explains the format that a URL must have so that, when sent to the browser, a document from within the DMS will be opened by DocIntegrate using the default handler for the file type and, once the document is closed again by the application used for editing, the modified document is again uploaded back to the DMS.
The logic for generating the URL to open a document is as follows:
package com.pi.docintegrate; import java.io.UnsupportedEncodingException; import org.apache.commons.codec.binary.Hex; public class Main { public static void main(String[] args) throws UnsupportedEncodingException { if (args.length < 4) { System.out.println("One of the parameters is not provided. " + "Please provide dms url, username, token and document path"); return; } String nuxeoServer = args[0]; String username = args[1]; String token = args[2]; String fullDocumentPath = args[3]; String targetPath = "n:\\Patricia" + fullDocumentPath.replace("/", "\\"); String targetPathHex = Hex.encodeHexString(targetPath.getBytes("UTF-8")); String adminPassHex = Hex.encodeHexString((username + ":" + token).getBytes("UTF-8")); String url = String.join("/", new String[]{ "pinuxeo:/", nuxeoServer, adminPassHex, "", targetPathHex}); System.out.println(url); } }