cancel
Showing results for 
Search instead for 
Did you mean: 

Operation Context Usage

alf_test
Champ in-the-making
Champ in-the-making
Hi All,

This is a generic question rather than issue.I wanted to know how effectively and efficiently i can use operationcontext while querying alfresco.I didn't find much docs on operation context and the api also lacks proper documentation.And there is very little available on web.
        It would be great if some one has used it to improve performance and filtering unnecessary data can share the usage.

Thanks
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Do you mean the OperationContext of the Apache Chemistry project ?

(org.apache.chemistry.opencmis.client.api.OperationContext)

alf_test
Champ in-the-making
Champ in-the-making
Yes..Using apache chemistry and wanted to know more of its usage.Not sure if i am raising this in a correct forum…

Thanks

fmui
Champ in-the-making
Champ in-the-making
Hi,

There is a straightforward correlation between the CMIS specification [1] and the OperationContext [2] in OpenCMIS. Each CMIS operation takes a set of optional parameters. These parameters are subsumed in the OperationContext. Many OpenCMIS methods accept an OperationContext object and use it to set these optional parameters. If no OperationContext object is provided by the application, a default OperationContext object [3] is used.

The CMIS Workbench, for example, makes use of the OperationContext. It sets up two OperationContext objects when it starts.
One OperationContext object is used for the folder list on left. This OperationContext only selects the data that is needed for this view: a handful of properties, no Allowable Actions, no ACLs, etc. That speeds up the retrieval of the list.
The second OperationContext is used to populate the right hand panels. It selects everything because it displays everthing.

Rule of thumb: Have an OperationContext object per view in your application. Only select what you really need for this view.


Florian


[1] http://docs.oasis-open.org/cmis/CMIS/v1.0/os/cmis-spec-v1.0.html#_Toc243905435
[2] http://chemistry.apache.org/java/0.4.0/maven/apidocs/index.html
[3] http://chemistry.apache.org/java/0.4.0/maven/apidocs/org/apache/chemistry/opencmis/client/api/Sessio...