You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Patrick Balm (JIRA)" <ji...@apache.org> on 2011/05/04 22:28:03 UTC
[jira] [Created] (CMIS-364) Folder getChildren() returns less than
available folders
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
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
[jira] [Resolved] (CMIS-364) Folder getChildren() returns less than
available folders
Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Commented] (CMIS-364) Folder getChildren() returns less
than available folders
Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029519#comment-13029519 ]
Florian Müller commented on CMIS-364:
-------------------------------------
Check also the max number of permission evaluations.
> 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
[jira] [Commented] (CMIS-364) Folder getChildren() returns less
than available folders
Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029516#comment-13029516 ]
Florian Müller commented on CMIS-364:
-------------------------------------
getChildren() is implemented with a Lucene query in Alfresco. Check your Lucene configuration.
It's not an OpenCMIS issue.
> 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
>
> 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
[jira] [Commented] (CMIS-364) Folder getChildren() returns less
than available folders
Posted by "Patrick Balm (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029789#comment-13029789 ]
Patrick Balm commented on CMIS-364:
-----------------------------------
Thanks Florian.
For future searches:
The Alfresco properties in question are:
system.acl.maxPermissionCheckTimeMillis=10000
# The maximum number of results to perform permission checks against
system.acl.maxPermissionChecks=1000
/patrick
> 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