mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merged CMIS063 to HEAD
16728: CMIS 0.7 upgrade - checkpoint. 16770: CMIS 0.7 upgrade - checkpoint. 16795: CMIS 0.7 upgrade - checkpoint git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17240 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -279,39 +279,39 @@
|
||||
|
||||
[#macro propvalue name value type]
|
||||
[#if type == cmisconstants.DATATYPE_STRING]
|
||||
<cmis:propertyString pdid="${name}">[@values value;v]<cmis:value>[@stringvalue v/]</cmis:value>[/@values]</cmis:propertyString>
|
||||
<cmis:propertyString propertyDefinitionId="${name}">[@values value;v]<cmis:value>[@stringvalue v/]</cmis:value>[/@values]</cmis:propertyString>
|
||||
[#elseif type == cmisconstants.DATATYPE_INTEGER]
|
||||
<cmis:propertyInteger pdid="${name}">[@values value;v]<cmis:value>[@integervalue v/]</cmis:value>[/@values]</cmis:propertyInteger>
|
||||
<cmis:propertyInteger propertyDefinitionId="${name}">[@values value;v]<cmis:value>[@integervalue v/]</cmis:value>[/@values]</cmis:propertyInteger>
|
||||
[#elseif type == cmisconstants.DATATYPE_DECIMAL]
|
||||
<cmis:propertyDecimal pdid="${name}">[@values value;v]<cmis:value>[@decimalvalue v/]</cmis:value>[/@values]</cmis:propertyDecimal>
|
||||
<cmis:propertyDecimal propertyDefinitionId="${name}">[@values value;v]<cmis:value>[@decimalvalue v/]</cmis:value>[/@values]</cmis:propertyDecimal>
|
||||
[#elseif type == cmisconstants.DATATYPE_BOOLEAN]
|
||||
<cmis:propertyBoolean pdid="${name}">[@values value;v]<cmis:value>[@booleanvalue v/]</cmis:value>[/@values]</cmis:propertyBoolean>
|
||||
<cmis:propertyBoolean propertyDefinitionId="${name}">[@values value;v]<cmis:value>[@booleanvalue v/]</cmis:value>[/@values]</cmis:propertyBoolean>
|
||||
[#elseif type == cmisconstants.DATATYPE_DATETIME]
|
||||
<cmis:propertyDateTime pdid="${name}">[@values value;v]<cmis:value>[@datetimevalue v/]</cmis:value>[/@values]</cmis:propertyDateTime>
|
||||
<cmis:propertyDateTime propertyDefinitionId="${name}">[@values value;v]<cmis:value>[@datetimevalue v/]</cmis:value>[/@values]</cmis:propertyDateTime>
|
||||
[#elseif type == cmisconstants.DATATYPE_URI]
|
||||
[#-- TODO: check validity of abs url prefix --]
|
||||
<cmis:propertyUri pdid="${name}">[@values value;v]<cmis:value>[@urivalue absurl(url.serviceContext) + v/]</cmis:value>[/@values]</cmis:propertyUri>
|
||||
<cmis:propertyUri propertyDefinitionId="${name}">[@values value;v]<cmis:value>[@urivalue absurl(url.serviceContext) + v/]</cmis:value>[/@values]</cmis:propertyUri>
|
||||
[#elseif type == cmisconstants.DATATYPE_ID]
|
||||
<cmis:propertyId pdid="${name}">[@values value;v]<cmis:value>[@idvalue v/]</cmis:value>[/@values]</cmis:propertyId>
|
||||
<cmis:propertyId propertyDefinitionId="${name}">[@values value;v]<cmis:value>[@idvalue v/]</cmis:value>[/@values]</cmis:propertyId>
|
||||
[#-- TODO: remaining property types --]
|
||||
[/#if]
|
||||
[/#macro]
|
||||
|
||||
[#macro propnull name type]
|
||||
[#if type == cmisconstants.DATATYPE_STRING]
|
||||
<cmis:propertyString pdid="${name}"/>
|
||||
<cmis:propertyString propertyDefinitionId="${name}"/>
|
||||
[#elseif type == cmisconstants.DATATYPE_INTEGER]
|
||||
<cmis:propertyInteger pdid="${name}"/>
|
||||
<cmis:propertyInteger propertyDefinitionId="${name}"/>
|
||||
[#elseif type == cmisconstants.DATATYPE_DECIMAL]
|
||||
<cmis:propertyDecimal pdid="${name}"/>
|
||||
<cmis:propertyDecimal propertyDefinitionId="${name}"/>
|
||||
[#elseif type == cmisconstants.DATATYPE_BOOLEAN]
|
||||
<cmis:propertyBoolean pdid="${name}"/>
|
||||
<cmis:propertyBoolean propertyDefinitionId="${name}"/>
|
||||
[#elseif type == cmisconstants.DATATYPE_DATETIME]
|
||||
<cmis:propertyDateTime pdid="${name}"/>
|
||||
<cmis:propertyDateTime propertyDefinitionId="${name}"/>
|
||||
[#elseif type == cmisconstants.DATATYPE_URI]
|
||||
<cmis:propertyUri pdid="${name}"/>
|
||||
<cmis:propertyUri propertyDefinitionId="${name}"/>
|
||||
[#elseif type == cmisconstants.DATATYPE_ID]
|
||||
<cmis:propertyId pdid="${name}"/>
|
||||
<cmis:propertyId propertyDefinitionId="${name}"/>
|
||||
[#-- TODO: remaining property types --]
|
||||
[/#if]
|
||||
[/#macro]
|
||||
|
@@ -170,7 +170,42 @@ function updateNode(node, entry, exclude, validator)
|
||||
}
|
||||
|
||||
// handle content
|
||||
if (entry.content != null && entry.contentSrc == null)
|
||||
// NOTE: cmisra:content overrides atom:content
|
||||
var cmiscontent = entry.getExtension(atom.names.cmisra_content);
|
||||
if (cmiscontent != null)
|
||||
{
|
||||
if (!node.isDocument)
|
||||
{
|
||||
status.code = 400;
|
||||
status.message = "Cannot update content on folder " + node.displayPath;
|
||||
status.redirect = true;
|
||||
return null;
|
||||
}
|
||||
|
||||
var mediatype = cmiscontent.mediaType;
|
||||
if (mediatype == null)
|
||||
{
|
||||
status.code = 400;
|
||||
status.message = "cmisra:content mediatype is missing";
|
||||
status.redirect = true;
|
||||
return null;
|
||||
}
|
||||
var contentStream = cmiscontent.contentStream;
|
||||
if (contentStream == null)
|
||||
{
|
||||
status.code = 400;
|
||||
status.message = "cmisra:content base64 content is missing";
|
||||
status.redirect = true;
|
||||
return null;
|
||||
}
|
||||
|
||||
// update content
|
||||
node.properties.content.write(contentStream);
|
||||
node.properties.content.encoding = "UTF-8";
|
||||
node.properties.content.mimetype = mediatype;
|
||||
}
|
||||
|
||||
if (cmiscontent == null && entry.content != null && entry.contentSrc == null)
|
||||
{
|
||||
if (!node.isDocument)
|
||||
{
|
||||
|
@@ -1,9 +1,9 @@
|
||||
[#ftl]
|
||||
[#macro appNS]http://www.w3.org/2007/app[/#macro]
|
||||
[#macro atomNS]http://www.w3.org/2005/Atom[/#macro]
|
||||
[#macro cmisNS]http://docs.oasis-open.org/ns/cmis/core/200901[/#macro]
|
||||
[#macro cmismNS]http://docs.oasis-open.org/ns/cmis/messaging/200901[/#macro]
|
||||
[#macro cmisraNS]http://docs.oasis-open.org/ns/cmis/restatom/200901[/#macro]
|
||||
[#macro cmisNS]http://docs.oasis-open.org/ns/cmis/core/200908/[/#macro]
|
||||
[#macro cmismNS]http://docs.oasis-open.org/ns/cmis/messaging/200908/[/#macro]
|
||||
[#macro cmisraNS]http://docs.oasis-open.org/ns/cmis/restatom/200908/[/#macro]
|
||||
[#macro alfNS]http://www.alfresco.org[/#macro]
|
||||
[#macro opensearchNS]http://a9.com/-/spec/opensearch/1.1/[/#macro]
|
||||
[#macro serviceNS]xmlns="[@appNS/]" xmlns:atom="[@atomNS/]" xmlns:cmisra="[@cmisraNS/]" xmlns:cmis="[@cmisNS/]" xmlns:alf="[@alfNS/]"[/#macro]
|
||||
|
@@ -0,0 +1,6 @@
|
||||
<webscript>
|
||||
<shortname>Test client atom api</shortname>
|
||||
<description>Parse atom feed</description>
|
||||
<url>/sample/cmis/folder/{id}</url>
|
||||
<authentication>none</authentication>
|
||||
</webscript>
|
@@ -0,0 +1,38 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>${folder.title} Folder</title>
|
||||
<link rel="stylesheet" type="text/css" href="${url.context}/themes/default/base.css" />
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr><td><a href="${url.serviceContext}/sample/cmis/repo">CMIS Repository</a>: ${folder.title} folder</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<table>
|
||||
<#if folder.getLinks("cmis-parent")?first?exists>
|
||||
<tr>
|
||||
<td>d</td><td></td><td></td><td></td>
|
||||
<td><a href="${url.serviceContext}${folder.getLinks("cmis-parent")?first.href?replace(".*/api/", url.match, "r")}">..</a></td>
|
||||
</tr>
|
||||
</#if>
|
||||
<#list children.entries as entry>
|
||||
<#assign cmis_object=entry.getExtension(atom.names.cmis_object)>
|
||||
<tr>
|
||||
<#if cmis_object.baseType.value == "folder">
|
||||
<td>d</td>
|
||||
<td>${cmis_object.lastModifiedBy.value}</td>
|
||||
<td></td>
|
||||
<td>${cmis_object.lastModificationDate.dateValue?datetime}</td>
|
||||
<td><a href="${url.serviceContext}${entry.selfLink.href?replace(".*/api/", url.match, "r")}">${cmis_object.name.value}</a></td>
|
||||
<#else>
|
||||
<td></td>
|
||||
<td>${cmis_object.lastModifiedBy.value}</td>
|
||||
<td>${cmis_object.contentStreamLength.integerValue?string}</td>
|
||||
<td>${cmis_object.lastModificationDate.dateValue?datetime}</td>
|
||||
<td><a target="_new" href="${url.context}${entry.contentSrc?replace(".*/api/", "/proxy/alfresco/api/", "r")}">${cmis_object.name.value}</a></td>
|
||||
</#if>
|
||||
</tr>
|
||||
</#list>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,14 @@
|
||||
script:
|
||||
{
|
||||
var id = (url.extension == "") ? "/api/path/workspace/SpacesStore/Company Home" : "/api/" + url.extension;
|
||||
var conn = remote.connect("alfresco");
|
||||
|
||||
// retrieve folder
|
||||
var folderResult = conn.get(stringUtils.urlEncodeComponent(id));
|
||||
model.folder = atom.toEntry(folderResult.response);
|
||||
|
||||
// retrieve folder children
|
||||
var childrenId = model.folder.getLinks("cmis-children").get(0).href;
|
||||
var childrenResult = conn.get(childrenId);
|
||||
model.children = atom.toFeed(childrenResult.response);
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
<webscript>
|
||||
<shortname>CMIS Repository</shortname>
|
||||
<description>Sample Surf component using CMIS Service document</description>
|
||||
<url>/sample/cmis/repo?service={serviceUrl?}</url>
|
||||
<authentication>none</authentication>
|
||||
</webscript>
|
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Repository: ${repo.name}</title>
|
||||
<link rel="stylesheet" type="text/css" href="${url.context}/themes/default/base.css" />
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr><td>CMIS Repository</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<table>
|
||||
<tr><td>Name:</td><td>${repo.name} (<a href="${url.serviceContext}${repo.rootFolderId?replace(".*/api", "/sample/cmis/folder", "r")}">Root Folder</a>)</td></tr>
|
||||
<tr><td>Id:</td><td>${repo.id}<td></tr>
|
||||
<tr><td>Product Name:</td><td>${repo.productName}<td></tr>
|
||||
<tr><td>Product Version:</td><td>${repo.productVersion}<td></tr>
|
||||
<tr><td>Vendor:</td><td>${repo.vendorName}<td></tr>
|
||||
<tr><td>CMIS Version:</td><td>${repo.versionsSupported}<td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,10 @@
|
||||
script:
|
||||
{
|
||||
var serviceUrl = (args.service === null) ? "/api/repository" : args.service;
|
||||
var conn = remote.connect("alfresco");
|
||||
var result = conn.get(stringUtils.urlEncodeComponent(serviceUrl));
|
||||
|
||||
var service = atom.toService(result.response);
|
||||
var workspace = service.workspaces.get(0);
|
||||
model.repo = workspace.getExtension(atom.names.cmisra_repositoryInfo);
|
||||
}
|
@@ -6,50 +6,54 @@
|
||||
<workspace cmis:id="${server.id}" cmis:repositoryRelationship="self">
|
||||
<atom:title>${server.name}</atom:title>
|
||||
|
||||
<collection href="${absurl(url.serviceContext)}[@linksLib.nodeuri defaultRootFolder/]/children" cmisra:collectionType="root">
|
||||
<collection href="${absurl(url.serviceContext)}[@linksLib.nodeuri defaultRootFolder/]/children">
|
||||
<atom:title>root collection</atom:title>
|
||||
<cmisra:collectionType>root</cmisra:collectionType>
|
||||
</collection>
|
||||
<collection href="${absurl(url.serviceContext)}/api/types" cmisra:collectionType="types">
|
||||
<collection href="${absurl(url.serviceContext)}/api/types">
|
||||
<atom:title>type collection</atom:title>
|
||||
<cmisra:collectionType>types</cmisra:collectionType>
|
||||
</collection>
|
||||
<collection href="${absurl(url.serviceContext)}/api/checkedout" cmisra:collectionType="checkedout">
|
||||
<collection href="${absurl(url.serviceContext)}/api/checkedout">
|
||||
<atom:title>checkedout collection</atom:title>
|
||||
<accept>${cmisconstants.MIMETYPE_ENTRY}</accept>
|
||||
<cmisra:collectionType>checkedout</cmisra:collectionType>
|
||||
</collection>
|
||||
<collection href="${absurl(url.serviceContext)}/api/unfiled" cmisra:collectionType="unfiled">
|
||||
<collection href="${absurl(url.serviceContext)}/api/unfiled">
|
||||
<atom:title>unfiled collection</atom:title>
|
||||
<accept>${cmisconstants.MIMETYPE_ENTRY}</accept>
|
||||
<cmisra:collectionType>unfiled</cmisra:collectionType>
|
||||
</collection>
|
||||
<collection href="${absurl(url.serviceContext)}/api/queries" cmisra:collectionType="query">
|
||||
<collection href="${absurl(url.serviceContext)}/api/queries">
|
||||
<atom:title>query collection</atom:title>
|
||||
<accept>${cmisconstants.MIMETYPE_CMIS_QUERY}</accept>
|
||||
<cmisra:collectionType>query</cmisra:collectionType>
|
||||
</collection>
|
||||
|
||||
<atom:link title="root folder tree" type="${cmisconstants.MIMETYPE_CMISTREE}" rel="http://docs.oasis-open.org/ns/cmis/link/200901/foldertree" href="${absurl(url.serviceContext)}[@linksLib.nodeuri defaultRootFolder/]/tree"/>
|
||||
<atom:link title="root descendants" type="${cmisconstants.MIMETYPE_CMISTREE}" rel="http://docs.oasis-open.org/ns/cmis/link/200901/rootdescendants" href="${absurl(url.serviceContext)}[@linksLib.nodeuri defaultRootFolder/]/descendants"/>
|
||||
<atom:link title="type descendants" type="${cmisconstants.MIMETYPE_CMISTREE}" rel="http://docs.oasis-open.org/ns/cmis/link/200901/typesdescendants" href="${absurl(url.serviceContext)}/api/types/descendants"/>
|
||||
<atom:link title="root folder tree" type="${cmisconstants.MIMETYPE_CMISTREE}" rel="${cmisconstants.REL_FOLDER_TREE}" href="${absurl(url.serviceContext)}[@linksLib.nodeuri defaultRootFolder/]/tree"/>
|
||||
<atom:link title="root descendants" type="${cmisconstants.MIMETYPE_CMISTREE}" rel="${cmisconstants.REL_ROOT_DESCENDANTS}" href="${absurl(url.serviceContext)}[@linksLib.nodeuri defaultRootFolder/]/descendants"/>
|
||||
<atom:link title="type descendants" type="${cmisconstants.MIMETYPE_CMISTREE}" rel="${cmisconstants.REL_TYPES_DESCENDANTS}" href="${absurl(url.serviceContext)}/api/types/descendants"/>
|
||||
|
||||
<cmisra:repositoryInfo>
|
||||
<cmis:repositoryId>${server.id}</cmis:repositoryId>
|
||||
<cmis:repositoryName>${server.name}</cmis:repositoryName>
|
||||
<cmis:repositoryRelationship>self</cmis:repositoryRelationship>
|
||||
<cmis:repositoryDescription></cmis:repositoryDescription> [#-- TODO --]
|
||||
<cmis:vendorName>Alfresco</cmis:vendorName>
|
||||
<cmis:productName>Alfresco Repository (${server.edition})</cmis:productName>
|
||||
<cmis:productVersion>${server.version}</cmis:productVersion>
|
||||
<cmis:rootFolderId>[@linksLib.noderef defaultRootFolder/]</cmis:rootFolderId>
|
||||
[#-- TODO: implement change log --]
|
||||
<cmis:latestChangeToken></cmis:latestChangeToken>
|
||||
[#-- TODO: <cmis:latestChangeLogToken></cmis:latestChangeLogToken> --]
|
||||
<cmis:capabilities>
|
||||
<cmis:capabilityACL>[#-- TODO --]none</cmis:capabilityACL>
|
||||
<cmis:capabilityAllVersionsSearchable>${allVersionsSearchable?string}</cmis:capabilityAllVersionsSearchable>
|
||||
<cmis:capabilityChanges>[#-- TODO --]none</cmis:capabilityChanges>
|
||||
<cmis:capabilityChangesOnType>cmis:document</cmis:capabilityChangesOnType>
|
||||
<cmis:capabilityContentStreamUpdatability>anytime</cmis:capabilityContentStreamUpdatability>
|
||||
<cmis:capabilityGetDescendants>true</cmis:capabilityGetDescendants>
|
||||
<cmis:capabilityGetFolderTree>true</cmis:capabilityGetFolderTree>
|
||||
<cmis:capabilityMultifiling>true</cmis:capabilityMultifiling>
|
||||
<cmis:capabilityPWCSearchable>${pwcSearchable?string}</cmis:capabilityPWCSearchable>
|
||||
<cmis:capabilityPWCUpdateable>true</cmis:capabilityPWCUpdateable>
|
||||
<cmis:capabilityPWCUpdatable>true</cmis:capabilityPWCUpdatable>
|
||||
<cmis:capabilityQuery>${querySupport}</cmis:capabilityQuery>
|
||||
[#-- TODO: implement rendition spec --]
|
||||
<cmis:capabilityRenditions>none</cmis:capabilityRenditions>
|
||||
@@ -60,6 +64,9 @@
|
||||
[#-- TODO: implement ACL spec --]
|
||||
[#-- <cmis:aclCapability></cmis:aclCapability> --]
|
||||
<cmis:cmisVersionSupported>${cmisVersion}</cmis:cmisVersionSupported>
|
||||
[#-- TODO: implement change log --]
|
||||
[#-- TODO: <cmis:changesIncomplete></cmis:changesIncomplete> --]
|
||||
[#-- TODO: <cmis:changesOnType></cmis:changesOnType> --]
|
||||
</cmisra:repositoryInfo>
|
||||
|
||||
<cmisra:uritemplate>
|
||||
|
@@ -2,7 +2,7 @@ script:
|
||||
{
|
||||
// process query statement
|
||||
// <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
// <cmis:query xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901">
|
||||
// <cmis:query xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/">
|
||||
// <cmis:statement>SELECT * FROM Document</cmis:statement>
|
||||
// <cmis:searchAllVersions>true</cmis:searchAllVersions>
|
||||
// <cmis:maxItems>50</cmis:maxItems>
|
||||
@@ -16,7 +16,7 @@ script:
|
||||
return str.replace(/^\s+/, '');
|
||||
}
|
||||
|
||||
default xml namespace = 'http://docs.oasis-open.org/ns/cmis/core/200901';
|
||||
default xml namespace = 'http://docs.oasis-open.org/ns/cmis/core/200908/';
|
||||
|
||||
// regex to match an XML declaration
|
||||
var xmlDeclaration = /^<\?xml version[^>]+?>/;
|
||||
|
@@ -2,7 +2,7 @@ script:
|
||||
{
|
||||
// process query statement
|
||||
// <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
// <cmis:query xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901">
|
||||
// <cmis:query xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/">
|
||||
// <cmis:statement>SELECT * FROM Document</cmis:statement>
|
||||
// <cmis:searchAllVersions>true</cmis:searchAllVersions>
|
||||
// <cmis:maxItems>50</cmis:maxItems>
|
||||
|
@@ -96,7 +96,7 @@
|
||||
<property name="scriptObjects">
|
||||
<map merge="true">
|
||||
<entry key="paging">
|
||||
<ref bean="webscripts.js.paging" />
|
||||
<ref bean="webscripts.js.paging"/>
|
||||
</entry>
|
||||
</map>
|
||||
</property>
|
||||
@@ -152,6 +152,8 @@
|
||||
<property name="uriIndex" ref="webscripts.index.prototype" />
|
||||
</bean>
|
||||
|
||||
<bean id="webscripts.js.paging" class="org.alfresco.repo.web.util.paging.Paging" />
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- Web Script Authenticators -->
|
||||
@@ -173,12 +175,64 @@
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- Web Script Javascript Extensions -->
|
||||
<!-- CMIS API -->
|
||||
<!-- -->
|
||||
|
||||
<!-- TODO: the following root js objects should only really be available in context of web scripts -->
|
||||
<!-- CMIS Abdera Extension -->
|
||||
<bean id="webscripts.cmis.atom.extension" class="org.alfresco.web.scripts.atom.AbderaExtension">
|
||||
<property name="abderaService" ref="webscripts.abdera"/>
|
||||
<property name="QNames">
|
||||
<props>
|
||||
<prop key="cmisra_object">{http://docs.oasis-open.org/ns/cmis/restatom/200908/}object</prop>
|
||||
<prop key="cmisra_content">{http://docs.oasis-open.org/ns/cmis/restatom/200908/}content</prop>
|
||||
<prop key="cmisra_repositoryInfo">{http://docs.oasis-open.org/ns/cmis/restatom/200908/}repositoryInfo</prop>
|
||||
</props>
|
||||
</property>
|
||||
<property name="extensionFactories">
|
||||
<list>
|
||||
<bean class="org.apache.chemistry.abdera.ext.CMISExtensionFactory"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="webscripts.js.paging" class="org.alfresco.repo.web.util.paging.Paging" />
|
||||
<!-- CMIS custom mimetypes -->
|
||||
<bean id="webscripts.cmis.adaptors" parent="webscripts.adaptorset">
|
||||
<property name="readers">
|
||||
<list>
|
||||
<bean class="org.alfresco.repo.cmis.rest.CMISQueryReader" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Default Formats -->
|
||||
<bean id="webscripts.cmis.formats" parent="webscripts.formatmap">
|
||||
<property name="formats">
|
||||
<props>
|
||||
<prop key="cmisquery">application/cmisquery+xml</prop>
|
||||
<prop key="cmisallowableactions">application/cmisallowableactions+xml</prop>
|
||||
</props>
|
||||
</property>
|
||||
<property name="mimetypes">
|
||||
<props>
|
||||
<prop key="application/cmisquery+xml">cmisquery</prop>
|
||||
<prop key="application/cmisallowableactions+xml">application/cmisallowableactions+xml</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- CMIS Javsascript API -->
|
||||
<bean id="webscripts.js.cmis" parent="baseJavaScriptExtension" class="org.alfresco.repo.cmis.rest.CMISScript">
|
||||
<property name="extensionName"><value>cmis</value></property>
|
||||
<property name="serviceRegistry" ref="ServiceRegistry" />
|
||||
<property name="repository" ref="repositoryHelper" />
|
||||
<property name="CMISService" ref="CMISService" />
|
||||
<property name="CMISDictionaryService" ref="CMISDictionaryService" />
|
||||
<property name="CMISQueryService" ref="CMISQueryService" />
|
||||
<property name="paging" ref="webscripts.js.paging" />
|
||||
</bean>
|
||||
|
||||
<!-- CMIS Test Runner Web Script -->
|
||||
<bean id="webscript.org.alfresco.cmis.test.post" class="org.alfresco.repo.cmis.rest.test.CMISTestRunnerWebScript" parent="webscript" />
|
||||
|
||||
|
||||
<!-- -->
|
||||
@@ -440,50 +494,6 @@
|
||||
<bean id="rhinoScriptDebugger" class="org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger" init-method="start"/>
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- CMIS API -->
|
||||
<!-- -->
|
||||
|
||||
<!-- CMIS custom mimetypes -->
|
||||
<bean id="webscripts.cmis.adaptors" parent="webscripts.adaptorset">
|
||||
<property name="readers">
|
||||
<list>
|
||||
<bean class="org.alfresco.repo.cmis.rest.CMISQueryReader" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Default Formats -->
|
||||
<bean id="webscripts.cmis.formats" parent="webscripts.formatmap">
|
||||
<property name="formats">
|
||||
<props>
|
||||
<prop key="cmisquery">application/cmisquery+xml</prop>
|
||||
<prop key="cmisallowableactions">application/cmisallowableactions+xml</prop>
|
||||
</props>
|
||||
</property>
|
||||
<property name="mimetypes">
|
||||
<props>
|
||||
<prop key="application/cmisquery+xml">cmisquery</prop>
|
||||
<prop key="application/cmisallowableactions+xml">application/cmisallowableactions+xml</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- CMIS Javsascript API -->
|
||||
<bean id="webscripts.js.cmis" parent="baseJavaScriptExtension" class="org.alfresco.repo.cmis.rest.CMISScript">
|
||||
<property name="extensionName"><value>cmis</value></property>
|
||||
<property name="serviceRegistry" ref="ServiceRegistry" />
|
||||
<property name="repository" ref="repositoryHelper" />
|
||||
<property name="CMISService" ref="CMISService" />
|
||||
<property name="CMISDictionaryService" ref="CMISDictionaryService" />
|
||||
<property name="CMISQueryService" ref="CMISQueryService" />
|
||||
<property name="paging" ref="webscripts.js.paging" />
|
||||
</bean>
|
||||
|
||||
<!-- CMIS Helpers -->
|
||||
|
||||
<bean id="webscript.org.alfresco.cmis.test.post" class="org.alfresco.repo.cmis.rest.test.CMISTestRunnerWebScript" parent="webscript" />
|
||||
|
||||
<!-- -->
|
||||
<!-- Rules Service REST API -->
|
||||
<!-- -->
|
||||
|
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
package org.alfresco.repo.cmis.rest;
|
||||
|
||||
import org.alfresco.abdera.ext.cmis.CMISConstants;
|
||||
import org.apache.chemistry.abdera.ext.CMISConstants;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
|
||||
import freemarker.ext.beans.BeansWrapper;
|
||||
|
@@ -33,12 +33,12 @@ import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.abdera.ext.cmis.CMISConstants;
|
||||
import org.alfresco.util.Content;
|
||||
import org.alfresco.web.scripts.FormatReader;
|
||||
import org.alfresco.web.scripts.WebScriptException;
|
||||
import org.alfresco.web.scripts.WebScriptRequest;
|
||||
import org.alfresco.web.scripts.WebScriptResponse;
|
||||
import org.apache.chemistry.abdera.ext.CMISConstants;
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -29,11 +29,6 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
import org.alfresco.abdera.ext.cmis.CMISConstants;
|
||||
import org.alfresco.abdera.ext.cmis.CMISExtensionFactory;
|
||||
import org.alfresco.abdera.ext.cmis.CMISObject;
|
||||
import org.alfresco.abdera.ext.cmis.CMISProperties;
|
||||
import org.alfresco.abdera.ext.cmis.CMISProperty;
|
||||
import org.apache.abdera.Abdera;
|
||||
import org.apache.abdera.model.Document;
|
||||
import org.apache.abdera.model.Element;
|
||||
@@ -41,6 +36,11 @@ import org.apache.abdera.model.Entry;
|
||||
import org.apache.abdera.protocol.Response;
|
||||
import org.apache.abdera.protocol.client.AbderaClient;
|
||||
import org.apache.abdera.protocol.client.ClientResponse;
|
||||
import org.apache.chemistry.abdera.ext.CMISConstants;
|
||||
import org.apache.chemistry.abdera.ext.CMISExtensionFactory;
|
||||
import org.apache.chemistry.abdera.ext.CMISObject;
|
||||
import org.apache.chemistry.abdera.ext.CMISProperties;
|
||||
import org.apache.chemistry.abdera.ext.CMISProperty;
|
||||
import org.apache.commons.httpclient.UsernamePasswordCredentials;
|
||||
|
||||
|
||||
|
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
-*- rnc -*- RELAX NG Compact Syntax Grammar for the Atom Format
|
||||
Specification Version 11
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
elementFormDefault="qualified" targetNamespace="http://www.w3.org/2007/app"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app"
|
||||
xmlns:cmisc="http://docs.oasis-open.org/ns/cmis/core/200901"
|
||||
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200901"
|
||||
version="0.62d">
|
||||
<xs:import namespace="http://www.w3.org/2005/Atom"
|
||||
schemaLocation="ATOM.xsd" />
|
||||
<xs:import namespace="http://docs.oasis-open.org/ns/cmis/core/200901"
|
||||
schemaLocation="CMIS-Core.xsd" />
|
||||
<xs:import namespace="http://docs.oasis-open.org/ns/cmis/restatom/200901"
|
||||
schemaLocation="CMIS-RestAtom.xsd" />
|
||||
|
||||
<xs:element name="service" type="app:appServiceType"></xs:element>
|
||||
<xs:complexType name="appServiceType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="atom:author" minOccurs="0" maxOccurs="1"></xs:element>
|
||||
<xs:element ref="app:workspace" minOccurs="1" maxOccurs="unbounded"></xs:element>
|
||||
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"
|
||||
namespace="##other" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="workspace" type="app:appWorkspaceType"></xs:element>
|
||||
<xs:complexType name="appWorkspaceType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="atom:title"></xs:element>
|
||||
<xs:element ref="app:collection" minOccurs="0" maxOccurs="unbounded"></xs:element>
|
||||
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"
|
||||
namespace="##other" />
|
||||
</xs:sequence>
|
||||
<xs:attributeGroup ref="atom:undefinedAttribute"></xs:attributeGroup>
|
||||
</xs:complexType>
|
||||
<xs:element name="collection" type="app:appCollectionType"></xs:element>
|
||||
<xs:complexType name="appCollectionType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="atom:title"></xs:element>
|
||||
<xs:element name="accept" type="xs:string" minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xs:element name="categories" type="app:appCategoriesType"
|
||||
minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"
|
||||
namespace="##other" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="href" type="xs:anyURI"></xs:attribute>
|
||||
<xs:attributeGroup ref="atom:undefinedAttribute"></xs:attributeGroup>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="appCategoriesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="category" type="app:appCategoryType"
|
||||
minOccurs="0" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="fixed" type="xs:boolean" />
|
||||
</xs:complexType>
|
||||
<xs:complexType name="appCategoryType">
|
||||
<xs:sequence>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="scheme" type="xs:anyURI" />
|
||||
<xs:attribute name="term" type="xs:string" />
|
||||
<xs:attribute name="label" type="xs:string" />
|
||||
</xs:complexType>
|
||||
|
||||
<!-- -->
|
||||
<xs:element name="edited" type="atom:atomDateConstruct" />
|
||||
<xs:complexType name="appControlType">
|
||||
<xs:sequence>
|
||||
<xs:element name="draft" type="app:enumYesNo" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"
|
||||
namespace="##other" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="control" type="app:appControlType" />
|
||||
|
||||
<!-- rfc5023 13.1.1 -->
|
||||
<xs:simpleType name="enumYesNo">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="yes" />
|
||||
<xs:enumeration value="no" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
<!-- EOF -->
|
@@ -1,90 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="CMISMapping" class="org.alfresco.cmis.mapping.CMISMapping" >
|
||||
<property name="serviceRegistry">
|
||||
<ref bean="ServiceRegistry" />
|
||||
</property>
|
||||
<property name="CMISService">
|
||||
<ref bean="CMISService" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="CMISService" class="org.alfresco.cmis.mapping.CMISServicesImpl">
|
||||
<property name="CMISSpecVersion"><value>0.62</value></property>
|
||||
<property name="defaultRootPath"><value>workspace/SpacesStore/Company Home</value></property>
|
||||
<property name="dictionaryService" ref="dictionaryService" />
|
||||
<property name="CMISDictionaryService" ref="CMISDictionaryService" />
|
||||
<property name="searchService" ref="SearchService" />
|
||||
<property name="transactionHelper" ref="retryingTransactionHelper" />
|
||||
<property name="tenantAdminService" ref="tenantAdminService" />
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<property name="repository" ref="repositoryHelper" />
|
||||
</bean>
|
||||
|
||||
<bean id="CMISDictionaryService" class="org.alfresco.cmis.dictionary.CMISStrictDictionaryService" >
|
||||
<property name="dictionaryService">
|
||||
<ref bean="dictionaryService" />
|
||||
</property>
|
||||
<property name="dictionaryDAO">
|
||||
<ref bean="dictionaryDAO" />
|
||||
</property>
|
||||
<property name="CMISMapping">
|
||||
<ref bean="CMISMapping" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="CMIS.DictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
|
||||
<property name="models">
|
||||
<list>
|
||||
<value>alfresco/model/cmisModel.xml</value>
|
||||
<value>alfresco/cmisCustomModel.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="CMISQueryService" class="org.alfresco.cmis.search.CMISQueryServiceImpl" >
|
||||
<property name="CMISDictionaryService">
|
||||
<ref bean="CMISDictionaryService" />
|
||||
</property>
|
||||
<property name="CMISService">
|
||||
<ref bean="CMISService" />
|
||||
</property>
|
||||
<property name="queryEngine">
|
||||
<ref bean="adm.luceneQueryEngine" />
|
||||
</property>
|
||||
<property name="nodeService">
|
||||
<ref bean="nodeService" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="adm.luceneQueryEngine" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<value>org.alfresco.repo.search.impl.querymodel.QueryEngine</value>
|
||||
</property>
|
||||
<property name="target">
|
||||
<ref bean="adm.luceneQueryEngineImpl"/>
|
||||
</property>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<idref bean="adm.luceneQueryEngineSecurity"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="adm.luceneQueryEngineSecurity" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
|
||||
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
|
||||
<property name="accessDecisionManager"><ref bean="accessDecisionManager"/></property>
|
||||
<property name="afterInvocationManager"><ref bean="afterInvocationManager"/></property>
|
||||
<property name="objectDefinitionSource">
|
||||
<value>
|
||||
org.alfresco.repo.search.impl.querymodel.QueryEngine.executeQuery=AFTER_ACL_NODE.sys:base.Read
|
||||
org.alfresco.repo.search.impl.querymodel.QueryEngine.getQueryModelFactory=ACL_ALLOW
|
||||
</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
Reference in New Issue
Block a user