chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (CMIS-364) Folder getChildren() returns less than available folders
Date Thu, 05 May 2011 19:21:03 GMT

     [ https://issues.apache.org/jira/browse/CMIS-364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Florian Müller resolved CMIS-364.
---------------------------------

    Resolution: Fixed
      Assignee: Florian Müller

> Folder getChildren() returns less than available folders
> --------------------------------------------------------
>
>                 Key: CMIS-364
>                 URL: https://issues.apache.org/jira/browse/CMIS-364
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.3.0
>         Environment: Alfresco 3.4d (community) + postgresql 8.4 on Linux
> OpenCMIS 0.3-SNAPSHOT
>            Reporter: Patrick Balm
>            Assignee: Florian Müller
>
> Hi, 
> I am not sure if this a bug or my abuse of the opencmis API so here goes: 
> Environment: 
> Alfresco 3.4d (community) with over 2000 folders that need to be read and handled via
OpenCmis. 
> The following code only returns 1000 folders, instead of the approx. 2000+ folders in
Alfresco. 
> I tried with or without OperationContext. 
> Do I need to use a different API call or is it a bug? 
>     public List<Folder> getFolderList(Folder f) { 
>         List<Folder> folders = new ArrayList<Folder>(); 
>         OperationContext oc = getSession().getDefaultContext(); 
>         System.out.println("OperationContext"); 
>         System.out.println("----------------"); 
>         System.out.println("oc.getMaxItemsPerPage() = " + oc.getMaxItemsPerPage()); 
> //output returns 100
>         oc.setMaxItemsPerPage(250); 
>         getSession().setDefaultContext(oc); 
>         System.out.println("oc.getMaxItemsPerPage() = " + oc.getMaxItemsPerPage()); 
> //output returns 250
> //         ItemIterable<CmisObject> folderIterator = f.getChildren(); 
>          ItemIterable<CmisObject> folderIterator = f.getChildren(oc); 
>          Iterator it = folderIterator.iterator(); 
>          long l=1; 
>          while (it.hasNext()) { 
>              Folder folder =  (Folder)it.next(); 
>                 folders.add(folder); 
>              log.info("Folder: '"+folder.getName()+"'"); 
>              l++; 
>          } 
>          log.info("Total "+l+" folders in directory"); 
>         return folders; 
>     } 
> //returns 1000 folders instead of 2000+

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message