Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 64771DF30 for ; Wed, 28 Nov 2012 19:36:00 +0000 (UTC) Received: (qmail 55981 invoked by uid 500); 28 Nov 2012 19:36:00 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 55269 invoked by uid 500); 28 Nov 2012 19:35:59 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 54906 invoked by uid 99); 28 Nov 2012 19:35:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 19:35:59 +0000 Date: Wed, 28 Nov 2012 19:35:59 +0000 (UTC) From: "Angel Gerdzhikov (JIRA)" To: dev@chemistry.apache.org Message-ID: <1706125513.34863.1354131359149.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (CMIS-608) ItemIterable doesn't do paging when using Atom Pub MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Angel Gerdzhikov created CMIS-608: ------------------------------------- Summary: 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 children = folder.getChildren() ArrayList list = new ArrayList(); ItemIterable 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