mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged CMIS063 to HEAD
16809: CMIS 0.7 upgrade - checkpoint. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17241 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -67,3 +67,9 @@
|
||||
<opensearch:startIndex>${cursor.startRow}</opensearch:startIndex>
|
||||
<opensearch:itemsPerPage>${cursor.pageSize}</opensearch:itemsPerPage>
|
||||
[/#macro]
|
||||
|
||||
[#macro cmis cursor]
|
||||
[#-- NOTE: this macro requires the definition of xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" in --]
|
||||
[#-- the enclosing document --]
|
||||
<cmisra:numItems>${cursor.totalRows}</cmisra:numItems>
|
||||
[/#macro]
|
||||
|
@@ -3,7 +3,7 @@
|
||||
[#import "/org/alfresco/cmis/links.lib.atom.ftl" as linksLib/]
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service [@nsLib.serviceNS/]>
|
||||
<workspace cmis:id="${server.id}" cmis:repositoryRelationship="self">
|
||||
<workspace cmis:id="${server.id}">
|
||||
<atom:title>${server.name}</atom:title>
|
||||
|
||||
<collection href="${absurl(url.serviceContext)}[@linksLib.nodeuri defaultRootFolder/]/children">
|
||||
|
@@ -16,6 +16,7 @@
|
||||
[@pagingLib.linksredirect cursor "${queryUri}" "${queryArgs}" "${cmisconstants.MIMETYPE_FEED}"/]
|
||||
[/@feedLib.generic]
|
||||
[@pagingLib.opensearch cursor/]
|
||||
[@pagingLib.cmis cursor/]
|
||||
|
||||
[#assign rs = cmisresultset(resultset)]
|
||||
[#list rs.rows as row]
|
||||
|
@@ -16,6 +16,7 @@
|
||||
[@pagingLib.links cursor/]
|
||||
[/@feedLib.generic]
|
||||
[@pagingLib.opensearch cursor/]
|
||||
[@pagingLib.cmis cursor/]
|
||||
|
||||
[#assign rs = cmisresultset(resultset)]
|
||||
[#list rs.rows as row]
|
||||
|
@@ -22,6 +22,7 @@
|
||||
[@pagingLib.links cursor/]
|
||||
[/@feedLib.node]
|
||||
[@pagingLib.opensearch cursor/]
|
||||
[@pagingLib.cmis cursor/]
|
||||
|
||||
[#list results as child]
|
||||
[#if child.isDocument]
|
||||
|
@@ -17,6 +17,7 @@
|
||||
[@pagingLib.links cursor/]
|
||||
[/@feedLib.node]
|
||||
[@pagingLib.opensearch cursor/]
|
||||
[@pagingLib.cmis cursor/]
|
||||
|
||||
[#list results as assoc]
|
||||
[@entryLib.assoc assoc=assoc propfilter=filter includeallowableactions=includeAllowableActions/]
|
||||
|
@@ -23,6 +23,7 @@
|
||||
[@pagingLib.links cursor/]
|
||||
[/@feedLib.generic]
|
||||
[@pagingLib.opensearch cursor/]
|
||||
[@pagingLib.cmis cursor/]
|
||||
|
||||
[#list results as child]
|
||||
[@entryLib.typedef child includePropertyDefinitions/]
|
||||
|
@@ -29,7 +29,14 @@ script:
|
||||
|
||||
// depth
|
||||
var depth = args[cmis.ARG_DEPTH];
|
||||
model.depth = (depth === null) ? 1 : parseInt(depth);
|
||||
if (depth == 0)
|
||||
{
|
||||
status.code = 500;
|
||||
status.message = "Depth cannot be 0";
|
||||
status.redirect = true;
|
||||
break script;
|
||||
}
|
||||
model.depth = (depth === null) ? -1 : parseInt(depth);
|
||||
|
||||
// handle property definitions
|
||||
var includePropertyDefinitions = args[cmis.ARG_INCLUDE_PROPERTY_DEFINITIONS];
|
||||
|
@@ -168,7 +168,8 @@ public class ContentSet extends AbstractWebScript
|
||||
ContentReader reader = contentService.getReader(nodeRef, propertyQName);
|
||||
if (reader != null)
|
||||
{
|
||||
throw new WebScriptException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Content already exists.");
|
||||
// error code as per CMIS specification
|
||||
throw new WebScriptException(HttpServletResponse.SC_CONFLICT, "Content already exists.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user