chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angel Gerdzhikov (JIRA)" <>
Subject [jira] [Created] (CMIS-608) ItemIterable doesn't do paging when using Atom Pub
Date Wed, 28 Nov 2012 19:35:59 GMT
Angel Gerdzhikov created CMIS-608:

             Summary: ItemIterable doesn't do paging when using Atom Pub
                 Key: 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.

        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)) {
                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);

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:

View raw message