As part of an operation, I need to retrieve the path to a document's file:content for a remote system to access via WebDAV.
However, the path as retrieved by getPathAsString() and getFilePath() do not match the path to the document as observed via WebDAV.
public void run(DocumentModel input) throws ClientException {
// ...
LOG.info(input.getPathAsString());
BlobHolder x = input.getAdapter(BlobHolder.class);
LOG.info(x.getFilePath());
// ...
}
yields
/default-domain/workspaces/Publisher Content/Testing/foo bar
/default-domain/workspaces/Publisher Content/Testing/foo bar/document.pdf
But the observed path to the document is at
http://localhost:8080/nuxeo/site/dav/Publisher Content/Testing/document.pdf
(i.e. no /foo bar/ component).
In an automation operation, where should I be looking to derive a path for a DocumentModel that another system will later be able to access underneath http://example.com/nuxeo/site/dav ?