02-07-2019 01:21 PM
Hello,
Is there a method to get the subfolder list of a folder by its id ? I found the repository().fetchChildrenById(id) method but it returns all documents (documents and folders). In the UI, nuxeo is calling this url when we disclose a node in the tree :
with this enricher in the request header : X-NXenrichers.document : hasFolderishChild
May be I can use the Java Client API to make this call ?
02-11-2019 05:10 AM
Hello,
The fetchChildrenById
is designed to return all kind of documents, it calls the @children
web adapter server side.
The url you give is a call to the tree_children
page provider. You can request a page provider with the java client with Repository#queryByProvider
API.
In your context, the call to do would be something like below:
repository().enrichersForDocument("hasFolderishChild")
.queryByProvider("tree_children", "-1", "0", "", "", "", "FOLDER_ID");
Note: the java client is still using the query endpoint API which has been deprecated. We've planned to use search endpoint instead JAVACLIENT-178.
02-11-2019 05:10 AM
Hello,
The fetchChildrenById
is designed to return all kind of documents, it calls the @children
web adapter server side.
The url you give is a call to the tree_children
page provider. You can request a page provider with the java client with Repository#queryByProvider
API.
In your context, the call to do would be something like below:
repository().enrichersForDocument("hasFolderishChild")
.queryByProvider("tree_children", "-1", "0", "", "", "", "FOLDER_ID");
Note: the java client is still using the query endpoint API which has been deprecated. We've planned to use search endpoint instead JAVACLIENT-178.
10-18-2019 12:52 AM
Hi,
You can get the sub-folders of a particular workspace/folder with this query
nuxeoClient.repository() .query("SELECT * FROM Document WHERE ecm:parentId = ? AND ecm:isTrashed = 0 AND ecm:mixinType = 'Folderish' ",pageSize, pageNumber, null, "dc:title", "DESC", parentId);
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.