You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Florian Müller (JIRA)" <ji...@apache.org> on 2013/06/20 16:10:20 UTC
[jira] [Resolved] (CMIS-608) ItemIterable doesn't do paging when
using Atom Pub
[ https://issues.apache.org/jira/browse/CMIS-608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florian Müller resolved CMIS-608.
---------------------------------
Resolution: Not A Problem
> ItemIterable doesn't do paging when using Atom Pub
> --------------------------------------------------
>
> Key: CMIS-608
> URL: https://issues.apache.org/jira/browse/CMIS-608
> Project: Chemistry
> Issue Type: Bug
> Components: opencmis-client-bindings
> Affects Versions: OpenCMIS 0.7.0
> Environment: Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
> Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
> OSX 10.7.5, client on maven-jetty-plugin:6.1.24, server on apache-tomcat-6.0.32-ALFRESCO-4.0.2
> Reporter: Angel Gerdzhikov
>
> The following code doesn't work correct when using Atom Pub. When getting the second page, it is empty, but I'm sure they are more then one page.
> {code:java}
> Folder foder;
> ItemIterable<CmisObject> children = folder.getChildren()
> ArrayList<CmisObject> list = new ArrayList<CmisObject>();
> ItemIterable<CmisObject> page = children.getPage();
> long pageItemsCount = children.getPageNumItems();
> long totalItemsCount = children.getTotalNumItems();
> log.debug("Start filtering children: total children count " + totalItemsCount);
> log.debug("First page item count: " + pageItemsCount);
> for (int count = 0; count < totalItemsCount; ) {
> while (page.iterator().hasNext()) {
> CmisObject doc = page.iterator().next();
> if (isNoPWC(doc)) {
> list.add(doc);
> }
> count++;
> if (!page.iterator().hasNext() && count < totalItemsCount) {
> log.debug("Getting next page");
> children = children.skipTo(count);
> page = children.getPage();
> if (log.isDebugEnabled()) {
> pageItemsCount = page.getPageNumItems();
> log.debug("Page item count: " + pageItemsCount);
> }
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira