08-06-2013 05:41 PM
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 ?
08-07-2013 08:54 AM
The WebDAV "path" is basically the the same doc.getPathAsString()
, namely the sequence of doc.getName()
for the doc
objects (that are folderish) leading to the document, except that:
doc.getName()
but the filename of the doc's blob.See org.nuxeo.ecm.platform.wi.backend.SimpleBackend.getDisplayName
for the code.
08-07-2013 08:54 AM
The WebDAV "path" is basically the the same doc.getPathAsString()
, namely the sequence of doc.getName()
for the doc
objects (that are folderish) leading to the document, except that:
doc.getName()
but the filename of the doc's blob.See org.nuxeo.ecm.platform.wi.backend.SimpleBackend.getDisplayName
for the code.
08-07-2013 11:04 AM
This is exactly the pointer I needed. Thanks.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.