Merge from SEAMIST3

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10723 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2008-09-04 10:46:38 +00:00
parent f51be032bc
commit d4bb800e1d
11 changed files with 242 additions and 46 deletions

View File

@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="source/java"/> <classpathentry kind="src" path="source/java"/>
<classpathentry kind="src" path="source/generated"/> <classpathentry kind="src" path="source/generated"/>
<classpathentry kind="src" path="config"/> <classpathentry kind="src" path="source/test/java"/>
<classpathentry kind="src" path="source/test/java"/> <classpathentry kind="src" path="source/test-resources"/>
<classpathentry kind="src" path="source/test-resources"/> <classpathentry kind="src" path="config"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/Repository"/> <classpathentry combineaccessrules="false" kind="src" path="/Repository"/>
<classpathentry combineaccessrules="false" kind="src" path="/3rd Party"/> <classpathentry combineaccessrules="false" kind="src" path="/3rd Party"/>
<classpathentry combineaccessrules="false" kind="src" path="/Core"/> <classpathentry combineaccessrules="false" kind="src" path="/Core"/>
<classpathentry combineaccessrules="false" kind="src" path="/Alfresco JLAN"/> <classpathentry combineaccessrules="false" kind="src" path="/Alfresco JLAN"/>
<classpathentry combineaccessrules="false" kind="src" path="/WebScript Framework"/> <classpathentry combineaccessrules="false" kind="src" path="/WebScript Framework"/>
<classpathentry kind="output" path="build/classes"/> <classpathentry kind="output" path="build/classes"/>
</classpath> </classpath>

View File

@@ -125,6 +125,7 @@
<!-- Web Script Authenticators --> <!-- Web Script Authenticators -->
<!-- --> <!-- -->
<!-- HTTP Basic Authenticator (Servlet based) --> <!-- HTTP Basic Authenticator (Servlet based) -->
<bean id="webscripts.authenticator.basic" class="org.alfresco.repo.web.scripts.servlet.BasicHttpAuthenticatorFactory"> <bean id="webscripts.authenticator.basic" class="org.alfresco.repo.web.scripts.servlet.BasicHttpAuthenticatorFactory">
<property name="authenticationService" ref="AuthenticationService" /> <property name="authenticationService" ref="AuthenticationService" />
@@ -140,18 +141,6 @@
<bean id="webscripts.authenticator.facebook" class="org.alfresco.repo.web.scripts.facebook.FacebookAuthenticatorFactory" /> <bean id="webscripts.authenticator.facebook" class="org.alfresco.repo.web.scripts.facebook.FacebookAuthenticatorFactory" />
<!-- -->
<!-- CMIS Support -->
<!-- -->
<bean id="webscripts.cmis.navigation" class="org.alfresco.repo.cmis.Navigation">
<property name="dictionaryService" ref="dictionaryService" />
<property name="searchService" ref="searchService" />
</bean>
<bean id="webscripts.cmis.description" class="org.alfresco.repo.cmis.CMISDescription"/>
<!-- --> <!-- -->
<!-- Web Script Javascript Extensions --> <!-- Web Script Javascript Extensions -->
<!-- --> <!-- -->
@@ -160,14 +149,6 @@
<bean id="webscripts.js.paging" class="org.alfresco.repo.web.util.paging.Paging" /> <bean id="webscripts.js.paging" class="org.alfresco.repo.web.util.paging.Paging" />
<bean id="webscripts.js.cmis" parent="baseJavaScriptExtension" class="org.alfresco.repo.cmis.CMISScript">
<property name="extensionName"><value>cmis</value></property>
<property name="serviceRegistry" ref="ServiceRegistry" />
<property name="repository" ref="webscripts.repo" />
<property name="navigation" ref="webscripts.cmis.navigation" />
<property name="paging" ref="webscripts.js.paging" />
</bean>
<!-- --> <!-- -->
<!-- API Beans --> <!-- API Beans -->
@@ -257,7 +238,6 @@
</bean> </bean>
<!-- --> <!-- -->
<!-- Activity Feed Web Scripts --> <!-- Activity Feed Web Scripts -->
<!-- --> <!-- -->
@@ -313,7 +293,6 @@
</bean> </bean>
<!-- --> <!-- -->
<!-- Invite Service REST API --> <!-- Invite Service REST API -->
<!-- --> <!-- -->
@@ -402,18 +381,52 @@
</bean> </bean>
<!-- Switch on debugger by setting log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger to DEBUG --> <!-- Switch on debugger by setting log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger to DEBUG -->
<bean id="rhinoScriptDebugger" class="org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger" init-method="start"/> <bean id="rhinoScriptDebugger" class="org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger" init-method="start"/>
<!-- --> <!-- -->
<!-- CMIS API --> <!-- CMIS API -->
<!-- --> <!-- -->
<!-- CMIS Index --> <!-- CMIS Javsascript API -->
<bean id="webscript.org.alfresco.cmis.index.get" class="org.alfresco.repo.cmis.Index" parent="webscript"/> <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="webscripts.repo" />
<property name="navigation" ref="webscripts.cmis.navigation" />
<property name="paging" ref="webscripts.js.paging" />
</bean>
<!-- CMIS Helpers -->
<bean id="webscripts.cmis.navigation" class="org.alfresco.repo.cmis.rest.Navigation">
<property name="dictionaryService" ref="dictionaryService" />
<property name="searchService" ref="searchService" />
</bean>
<bean id="webscripts.cmis.description" class="org.alfresco.repo.cmis.rest.CMISDescription"/>
<bean id="webscripts.cmis.atom.extension" class="org.alfresco.web.scripts.atom.AbderaExtension">
<property name="abderaService" ref="webscripts.abdera"/>
<property name="defaultNamespace"><value>http://www.cmis.org/CMIS/1.0</value></property>
<property name="QNames">
<props>
<prop key="cmis_object">object</prop>
<prop key="cmis_baseType">baseType</prop>
</props>
</property>
<property name="extensionFactories">
<list>
<bean class="org.apache.abdera.ext.cmis.CMISExtensionFactory"/>
</list>
</property>
</bean>
<!-- CMIS -->
<bean id="webscript.org.alfresco.cmis.index.get" class="org.alfresco.repo.cmis.rest.Index" parent="webscript"/>
<alias alias="webscriptdesc.org.alfresco.repository.repository.get" name="webscripts.cmis.description"/> <alias alias="webscriptdesc.org.alfresco.repository.repository.get" name="webscripts.cmis.description"/>
<alias alias="webscriptdesc.org.alfresco.repository.store.children.get" name="webscripts.cmis.description"/> <alias alias="webscriptdesc.org.alfresco.repository.store.children.get" name="webscripts.cmis.description"/>
<alias alias="webscriptdesc.org.alfresco.repository.store.children.post" name="webscripts.cmis.description"/>
<alias alias="webscriptdesc.org.alfresco.repository.store.parent.get" name="webscripts.cmis.description"/> <alias alias="webscriptdesc.org.alfresco.repository.store.parent.get" name="webscripts.cmis.description"/>
<alias alias="webscriptdesc.org.alfresco.repository.store.parents.get" name="webscripts.cmis.description"/> <alias alias="webscriptdesc.org.alfresco.repository.store.parents.get" name="webscripts.cmis.description"/>
<alias alias="webscriptdesc.org.alfresco.repository.store.properties.get" name="webscripts.cmis.description"/> <alias alias="webscriptdesc.org.alfresco.repository.store.properties.get" name="webscripts.cmis.description"/>

View File

@@ -22,7 +22,7 @@
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" * http://www.alfresco.com/legal/licensing"
*/ */
package org.alfresco.repo.cmis; package org.alfresco.repo.cmis.rest;
import java.io.InputStream; import java.io.InputStream;
import java.io.Serializable; import java.io.Serializable;

View File

@@ -22,9 +22,9 @@
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" * http://www.alfresco.com/legal/licensing"
*/ */
package org.alfresco.repo.cmis; package org.alfresco.repo.cmis.rest;
import org.alfresco.repo.cmis.Navigation.TypesFilter; import org.alfresco.repo.cmis.rest.Navigation.TypesFilter;
import org.alfresco.repo.jscript.BaseScopableProcessorExtension; import org.alfresco.repo.jscript.BaseScopableProcessorExtension;
import org.alfresco.repo.jscript.ScriptNode; import org.alfresco.repo.jscript.ScriptNode;
import org.alfresco.repo.web.scripts.Repository; import org.alfresco.repo.web.scripts.Repository;

View File

@@ -22,7 +22,7 @@
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" * http://www.alfresco.com/legal/licensing"
*/ */
package org.alfresco.repo.cmis; package org.alfresco.repo.cmis.rest;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;

View File

@@ -22,7 +22,7 @@
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" * http://www.alfresco.com/legal/licensing"
*/ */
package org.alfresco.repo.cmis; package org.alfresco.repo.cmis.rest;
import java.util.List; import java.util.List;

View File

@@ -0,0 +1,49 @@
/*
* Copyright (C) 2005-2008 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
*/
package org.apache.abdera.ext.cmis;
import javax.xml.namespace.QName;
/**
* CMIS Namespace definitions for the Abdera ATOM library.
*
* Encapsulates access and modification of CMIS extension values to ATOM.
*
* NOTE: Potentially, this extension can be contributed to Abdera upon
* publication of CMIS. This is why it is organised under a
* non-Alfresco Java package. It follows the conventions of all
* other Abdera extensions.
*
* @author davidc
*/
public interface CMISConstants
{
public static final String CMIS_V10_NS = "http://www.cmis.org/CMIS/1.0";
public static final QName OBJECT = new QName(CMIS_V10_NS, "object");
public static final QName BASETYPE = new QName(CMIS_V10_NS, "baseType");
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (C) 2005-2008 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
*/
package org.apache.abdera.ext.cmis;
import org.apache.abdera.util.AbstractExtensionFactory;
/**
* CMIS Extension Factory for the Abdera ATOM Library.
*
* Encapsulates access and modification of CMIS extension values to ATOM.
*
* NOTE: Potentially, this extension can be contributed to Abdera upon
* publication of CMIS. This is why it is organised under a
* non-Alfresco Java package. It follows the conventions of all
* other Abdera extensions.
*
* @author davidc
*/
public class CMISExtensionFactory extends AbstractExtensionFactory
implements CMISConstants
{
public CMISExtensionFactory()
{
super(CMIS_V10_NS);
addImpl(OBJECT, CMISObject.class);
}
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright (C) 2005-2008 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
*/
package org.apache.abdera.ext.cmis;
import org.apache.abdera.factory.Factory;
import org.apache.abdera.model.Element;
import org.apache.abdera.model.ElementWrapper;
/**
* CMIS Object Element Wrapper for the Abdera ATOM library.
*
* Encapsulates access and modification of CMIS extension values to ATOM.
*
* NOTE: Potentially, this extension can be contributed to Abdera upon
* publication of CMIS. This is why it is organised under a
* non-Alfresco Java package. It follows the conventions of all
* other Abdera extensions.
*
* @author davidc
*/
public class CMISObject extends ElementWrapper
{
public CMISObject(Element internal)
{
super(internal);
}
public CMISObject(Factory factory)
{
super(factory, CMISConstants.OBJECT);
}
public String getBaseType()
{
Element child = getInternal().getFirstChild(CMISConstants.BASETYPE);
return (child == null) ? null : child.getText();
}
}

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://www.cmis.org/CMIS/1.0">
<title>Iñtërnâtiônàlizætiøn - 2</title>
<id>urn:uuid:12345678-1234-1234-1234-123412341234</id>
<summary>Create test 1 summary</summary>
<updated>2007-02-123T17:09:02Z</updated>
<author><name>Doolittle</name></author>
<content type="html">content 1</content>
<cmis:object>
<cmis:uri>http://example.org/atom04</cmis:uri>
<cmis:objectType>document</cmis:objectType>
<cmis:keyword index="0">XML</cmis:keyword>
<cmis:keyword index="1">standards</cmis:keyword>
</cmis:object>
</entry>
post /api/path/workspace/SpacesStore//children application/atom+xml <?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://www.cmis.org/CMIS/1.0"><title>Iñtërnâtiônàlizætiøn - 6</title><id>urn:uuid:12345678-1234-1234-1234-123412341234</id><summary>Create test 1 summary</summary><updated>2007-02-123T17:09:02Z</updated><author><name>Doolittle</name></author><content type="html">content 1</content><cmis:object><cmis:objectType>document</cmis:objectType></cmis:object></entry>
post /test/ext application/atom+xml <?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://www.cmis.org/CMIS/1.0"><title>Iñtërnâtiônàlizætiøn - 6</title><id>urn:uuid:12345678-1234-1234-1234-123412341234</id><summary>Create test 1 summary</summary><updated>2007-02-123T17:09:02Z</updated><author><name>Doolittle</name></author><content type="html">content 1</content><cmis:object><cmis:baseType>document</cmis:baseType></cmis:object></entry>

View File

@@ -15,4 +15,5 @@
</entry> </entry>
post /api/path/workspace/SpacesStore//children application/atom+xml <?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://www.cmis.org/CMIS/1.0"><title>Iñtërnâtiônàlizætiøn - 6</title><id>urn:uuid:12345678-1234-1234-1234-123412341234</id><summary>Create test 1 summary</summary><updated>2007-02-123T17:09:02Z</updated><author><name>Doolittle</name></author><content type="html">content 1</content><cmis:object><cmis:objectType>document</cmis:objectType></cmis:object></entry> post /api/path/workspace/SpacesStore//children application/atom+xml <?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://www.cmis.org/CMIS/1.0"><title>Iñtërnâtiônàlizætiøn - 6</title><id>urn:uuid:12345678-1234-1234-1234-123412341234</id><summary>Create test 1 summary</summary><updated>2007-02-123T17:09:02Z</updated><author><name>Doolittle</name></author><content type="html">content 1</content><cmis:object><cmis:objectType>document</cmis:objectType></cmis:object></entry>
post /test/ext application/atom+xml <?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://www.cmis.org/CMIS/1.0"><title>Iñtërnâtiônàlizætiøn - 6</title><id>urn:uuid:12345678-1234-1234-1234-123412341234</id><summary>Create test 1 summary</summary><updated>2007-02-123T17:09:02Z</updated><author><name>Doolittle</name></author><content type="html">content 1</content><cmis:object><cmis:baseType>document</cmis:baseType></cmis:object></entry>