Optional parameters when listing the children of a folder
Listing a folder can return a lot of content items, so it might be a good idea to be able to do some form of paging of the result. It is also beneficial to be able to only fetch those properties that we are interested in, so we can minimize the payload and speed up the application response time.
For this we can use the OperationContext
class. The OperationContext
class allows you to tune the amount of information returned for each content item by setting property filters and renditions filters, or by setting flags to include path segments, ACLs, allowable actions, policies, and relationships. The OperationContext
class is also used to control paging and caching during an operation.
Once paging is set up, OpenCMIS fetches each page asynchronously when it is requested. To set up paging, create a new method as follows:
public void listTopFolderWithPagingAndPropFilter(Session session) { Folder root = session.getRootFolder(); OperationContext...