12-15-2011 04:23 AM
12-16-2011 09:10 PM
<webscript>
<shortname>Example cmis query web script</shortname>
<description>
<![CDATA[
Executes a CMIS query statement against the contents of the Repository.
]]>
</description>
<url>/example/cmis/query?q={q}</url>
<args>
<arg>
<shortname>q</shortname>
<description>query statement to execute</description>
</arg>
</args>
<authentication>user</authentication>
</webscript>
var query = args.q;
var cmisConnection = cmis.getConnection();
var cmisSession = cmisConnection.getSession();
var results = cmisSession.query(query, false);
model.query = query;
model.results = results.iterator();
{"query": "${query}",
"results": [
<#list results as res>
{"name":"${res.getPropertyValueByQueryName('cmis:name')}",
"id":"${res.getPropertyValueByQueryName('cmis:objectId')}"
}<#if res_has_next>,</#if>
</#list>
]
}
http://localhost:8080/alfresco/s/example/cmis/query?format=json&q=select%20cmis:name,cmis:objectId%2...
{"query": "select cmis:name,cmis:objectId from cmis:document where cmis:name ='testwhitepaper'",
"results": [
{"name":"testwhitepaper",
"id":"workspace://SpacesStore/9a007b6a-261a-4d6d-9e34-ded4430ba1ab;1.0"
},
{"name":"testwhitepaper",
"id":"workspace://SpacesStore/3356ff7d-4172-4bd5-a826-adfa541e6ad2;1.0"
}
]
}
01-22-2015 03:10 AM
12-19-2011 04:40 AM
10-10-2012 01:32 PM
06-05-2015 12:54 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.