I am using the alfresco repository with cmis and Alfresco Content Services REST API in my web application.
Executing a select query statement will get two documents, including the pwc version.
I want to get a list of documents except the pwc version.
I do not want to remove the pwc document from the query result after executing the doc for easy paging processing.
It seems that all properties about checking-out including cmis:versionLabel are not available in where clause.
Am I misinformed?
How can i get document list excluding private working copy version by cmis query or ACS REST api?
Thanks for reading.
The problem was solved by removing pwc from the query result statement.
There was no need to worry about this problem in the paging process.
Hello
I got same issue, how did you remove pwc in the cmis query ?
I am using Alfresco 5 and Apache chemistry java api.
thank you.
Hi @devor,
Have you looked at this documentation? It's deprecated but explains that pwc is to get the "private working copy".
Gets the specified information for the private working copy (for checking out & working with versions I believe).
Gets the specified information for the object (Folder or Document).
So, is it just a case of removing pwc from the query call?
HTH
Thanks for your reply.
yes I looked this documentation.
I buid a document explorer, using paging feature of api.
// exemple
final String query = this.createQuery(props, gedProperties, sortingCriteria, orderBy); // createQuery method exemple return -> SELECT * FROM mw:doc WHERE mw:entiteId='103861' ORDER BY cmis:name ASC
ItemIterable<QueryResult> result = session.query(query, false); // with false I return only last version of documents
final long totalItems = result.getTotalNumItems();
final ItemIterable<QueryResult> pageQueryResult = result.skipTo(0).getPage(5);
--------------------------
-without checkout any document
My result query, return 5 items , and my pageQueryResult return 5 , this case is ok.
- after checkout one of this 5 documents
totalItems return now 6 items ( 5 items + 1 pwc)
and my pageQueryResult return only 4 and the fifth is now in second page.
so I want to exclude pwc from the result.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.