mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged DEV/CMIS0_61 to HEAD (part 1)
13973 Replace CMIS XSDs / Sample XML files with 0.6 versions. - fix issues with some of the samples - CMISSchemaTest passes 13981 AtomPub binding complies with CMIS v0.6 XSDs and Namepaces. - Tests passing 13982 Running list of implemented changes between CMIS v0.5 and v0.6 13986 AtomPub binding comply with CMIS v0.6 data model & API (part 1) - Tests are passing git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14172 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="CMISService" class="org.alfresco.cmis.mapping.CMISServicesImpl">
|
<bean id="CMISService" class="org.alfresco.cmis.mapping.CMISServicesImpl">
|
||||||
<property name="CMISSpecVersion"><value>0.5</value></property>
|
<property name="CMISSpecVersion"><value>0.6</value></property>
|
||||||
<property name="defaultRootPath"><value>workspace/SpacesStore/Company Home</value></property>
|
<property name="defaultRootPath"><value>workspace/SpacesStore/Company Home</value></property>
|
||||||
<property name="dictionaryService" ref="dictionaryService" />
|
<property name="dictionaryService" ref="dictionaryService" />
|
||||||
<property name="CMISDictionaryService" ref="CMISDictionaryService" />
|
<property name="CMISDictionaryService" ref="CMISDictionaryService" />
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
</imports>
|
</imports>
|
||||||
|
|
||||||
<namespaces>
|
<namespaces>
|
||||||
<namespace uri="http://www.alfresco.org/model/cmis/0.5" prefix="cmis" />
|
<namespace uri="http://www.alfresco.org/model/cmis/0.6" prefix="cmis" />
|
||||||
</namespaces>
|
</namespaces>
|
||||||
|
|
||||||
<data-types>
|
<data-types>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
<types>
|
<types>
|
||||||
|
|
||||||
<type name="cmis:Object">
|
<type name="cmis:object">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="cmis:ObjectId">
|
<property name="cmis:ObjectId">
|
||||||
<title>Object Id</title>
|
<title>Object Id</title>
|
||||||
@@ -146,8 +146,8 @@
|
|||||||
</type>
|
</type>
|
||||||
|
|
||||||
<!-- TODO: mark as abstract -->
|
<!-- TODO: mark as abstract -->
|
||||||
<type name="cmis:FileSystemObject">
|
<type name="cmis:filesystemobject">
|
||||||
<parent>cmis:Object</parent>
|
<parent>cmis:object</parent>
|
||||||
<properties>
|
<properties>
|
||||||
<property name="cmis:Name">
|
<property name="cmis:Name">
|
||||||
<title>Name</title>
|
<title>Name</title>
|
||||||
@@ -163,10 +163,10 @@
|
|||||||
</properties>
|
</properties>
|
||||||
</type>
|
</type>
|
||||||
|
|
||||||
<type name="cmis:Document">
|
<type name="cmis:document">
|
||||||
<title>Document</title>
|
<title>Document</title>
|
||||||
<description>Document Type</description>
|
<description>Document Type</description>
|
||||||
<parent>cmis:FileSystemObject</parent>
|
<parent>cmis:filesystemobject</parent>
|
||||||
<properties>
|
<properties>
|
||||||
<property name="cmis:IsImmutable">
|
<property name="cmis:IsImmutable">
|
||||||
<title>Is Immutable</title>
|
<title>Is Immutable</title>
|
||||||
@@ -319,10 +319,10 @@
|
|||||||
</properties>
|
</properties>
|
||||||
</type>
|
</type>
|
||||||
|
|
||||||
<type name="cmis:Folder">
|
<type name="cmis:folder">
|
||||||
<title>Folder</title>
|
<title>Folder</title>
|
||||||
<description>Folder Type</description>
|
<description>Folder Type</description>
|
||||||
<parent>cmis:FileSystemObject</parent>
|
<parent>cmis:filesystemobject</parent>
|
||||||
<properties>
|
<properties>
|
||||||
<property name="cmis:ParentId">
|
<property name="cmis:ParentId">
|
||||||
<title>Parent Id</title>
|
<title>Parent Id</title>
|
||||||
@@ -347,10 +347,10 @@
|
|||||||
</properties>
|
</properties>
|
||||||
</type>
|
</type>
|
||||||
|
|
||||||
<type name="cmis:Relationship">
|
<type name="cmis:relationship">
|
||||||
<title>Relationship</title>
|
<title>Relationship</title>
|
||||||
<description>Relationship Type</description>
|
<description>Relationship Type</description>
|
||||||
<parent>cmis:Object</parent>
|
<parent>cmis:object</parent>
|
||||||
<properties>
|
<properties>
|
||||||
<property name="cmis:SourceId">
|
<property name="cmis:SourceId">
|
||||||
<title>Source Id</title>
|
<title>Source Id</title>
|
||||||
@@ -373,10 +373,10 @@
|
|||||||
</properties>
|
</properties>
|
||||||
</type>
|
</type>
|
||||||
|
|
||||||
<type name="cmis:Policy">
|
<type name="cmis:policy">
|
||||||
<title>Policy</title>
|
<title>Policy</title>
|
||||||
<description>Policy Type</description>
|
<description>Policy Type</description>
|
||||||
<parent>cmis:Object</parent>
|
<parent>cmis:object</parent>
|
||||||
<properties>
|
<properties>
|
||||||
<property name="cmis:PolicyName">
|
<property name="cmis:PolicyName">
|
||||||
<title>Policy Name</title>
|
<title>Policy Name</title>
|
||||||
|
@@ -37,22 +37,22 @@ public interface CMISDictionaryModel
|
|||||||
/**
|
/**
|
||||||
* Type id for CMIS documents, from the spec.
|
* Type id for CMIS documents, from the spec.
|
||||||
*/
|
*/
|
||||||
public static String DOCUMENT_OBJECT_TYPE = "Document";
|
public static String DOCUMENT_OBJECT_TYPE = "document";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type is for CMIS folders, from the spec.
|
* Type is for CMIS folders, from the spec.
|
||||||
*/
|
*/
|
||||||
public static String FOLDER_OBJECT_TYPE = "Folder";
|
public static String FOLDER_OBJECT_TYPE = "folder";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type Id for CMIS Relationships, from the spec.
|
* Type Id for CMIS Relationships, from the spec.
|
||||||
*/
|
*/
|
||||||
public static String RELATIONSHIP_OBJECT_TYPE = "Relationship";
|
public static String RELATIONSHIP_OBJECT_TYPE = "relationship";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type Id for CMIS Policies, from the spec.
|
* Type Id for CMIS Policies, from the spec.
|
||||||
*/
|
*/
|
||||||
public static String POLICY_OBJECT_TYPE = "Policy";
|
public static String POLICY_OBJECT_TYPE = "policy";
|
||||||
|
|
||||||
// TODO: spec issue - objectTypeEnum is lower cased - object type ids are repository specific in spec
|
// TODO: spec issue - objectTypeEnum is lower cased - object type ids are repository specific in spec
|
||||||
public static CMISTypeId DOCUMENT_TYPE_ID = new CMISTypeId(CMISScope.DOCUMENT, DOCUMENT_OBJECT_TYPE.toLowerCase(), ContentModel.TYPE_CONTENT);
|
public static CMISTypeId DOCUMENT_TYPE_ID = new CMISTypeId(CMISScope.DOCUMENT, DOCUMENT_OBJECT_TYPE.toLowerCase(), ContentModel.TYPE_CONTENT);
|
||||||
|
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2005-2007 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.alfresco.cmis;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CMIS Full Text Search Enum
|
|
||||||
*
|
|
||||||
* @author andyh
|
|
||||||
*/
|
|
||||||
public enum CMISFullTextSearchEnum implements EnumLabel
|
|
||||||
{
|
|
||||||
NO_FULL_TEXT("none"),
|
|
||||||
FULL_TEXT_ONLY("fulltextonly"),
|
|
||||||
FULL_TEXT_AND_STRUCTURED("fulltextandstructured");
|
|
||||||
|
|
||||||
|
|
||||||
private String label;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Construct
|
|
||||||
*
|
|
||||||
* @param label
|
|
||||||
*/
|
|
||||||
CMISFullTextSearchEnum(String label)
|
|
||||||
{
|
|
||||||
this.label = label;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.cmis.EnumLabel#label()
|
|
||||||
*/
|
|
||||||
public String getLabel()
|
|
||||||
{
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static EnumFactory<CMISFullTextSearchEnum> FACTORY = new EnumFactory<CMISFullTextSearchEnum>(CMISFullTextSearchEnum.class, null, true);
|
|
||||||
}
|
|
@@ -76,27 +76,6 @@ public interface CMISPropertyDefinition
|
|||||||
*/
|
*/
|
||||||
public CMISCardinalityEnum getCardinality();
|
public CMISCardinalityEnum getCardinality();
|
||||||
|
|
||||||
/**
|
|
||||||
* For variable length properties, get the maximum length allowed. Unsupported.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public int getMaximumLength();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For properties of type CMISPropertyType.XML the schema to which the property must conform. Unsupported
|
|
||||||
*
|
|
||||||
* @return - the schema URI
|
|
||||||
*/
|
|
||||||
public String getSchemaURI();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For properties of type CMISPropertyType.XML the encoding used for the property value
|
|
||||||
*
|
|
||||||
* @return the encoding
|
|
||||||
*/
|
|
||||||
public String getEncoding();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the choices available as values for this property TODO: not implemented yet
|
* Get the choices available as values for this property TODO: not implemented yet
|
||||||
*
|
*
|
||||||
@@ -145,7 +124,28 @@ public interface CMISPropertyDefinition
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isOrderable();
|
public boolean isOrderable();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For variable length properties, get the maximum length allowed. Unsupported.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int getMaximumLength();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For properties of type CMISPropertyType.XML the schema to which the property must conform. Unsupported
|
||||||
|
*
|
||||||
|
* @return - the schema URI
|
||||||
|
*/
|
||||||
|
public String getSchemaURI();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For properties of type CMISPropertyType.XML the encoding used for the property value
|
||||||
|
*
|
||||||
|
* @return the encoding
|
||||||
|
*/
|
||||||
|
public String getEncoding();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the property accessor (for reading / writing values)
|
* Gets the property accessor (for reading / writing values)
|
||||||
*
|
*
|
||||||
|
@@ -34,9 +34,9 @@ public enum CMISQueryEnum implements EnumLabel
|
|||||||
NONE("none"),
|
NONE("none"),
|
||||||
METADATA_ONLY("metadataonly"),
|
METADATA_ONLY("metadataonly"),
|
||||||
FULLTEXT_ONLY("fulltextonly"),
|
FULLTEXT_ONLY("fulltextonly"),
|
||||||
BOTH("both");
|
BOTH_SEPERATE("bothseperate"),
|
||||||
|
BOTH_COMBINED("bothcombined");
|
||||||
|
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -60,11 +60,6 @@ public interface CMISQueryService
|
|||||||
*/
|
*/
|
||||||
public CMISJoinEnum getJoinSupport();
|
public CMISJoinEnum getJoinSupport();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the full text search support level in queries.
|
|
||||||
*/
|
|
||||||
public CMISFullTextSearchEnum getFullTextSearchSupport();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Can you query Private Working Copies of a document.
|
* Can you query Private Working Copies of a document.
|
||||||
*
|
*
|
||||||
|
@@ -79,11 +79,11 @@ public interface CMISTypeDefinition
|
|||||||
public Collection<CMISTypeDefinition> getSubTypes(boolean descendants);
|
public Collection<CMISTypeDefinition> getSubTypes(boolean descendants);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the root type
|
* Get the base type
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public CMISTypeDefinition getRootType();
|
public CMISTypeDefinition getBaseType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the description for the type
|
* Get the description for the type
|
||||||
|
@@ -86,10 +86,10 @@ public class CMISTypeId implements Serializable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the root type id
|
* Get the base type id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public CMISTypeId getRootTypeId()
|
public CMISTypeId getBaseTypeId()
|
||||||
{
|
{
|
||||||
switch (scope)
|
switch (scope)
|
||||||
{
|
{
|
||||||
|
@@ -172,7 +172,7 @@ public class CMISAbstractTypeDefinition implements CMISTypeDefinition, Serializa
|
|||||||
logger.debug("Type " + objectTypeId + ": parent=" + (parentType == null ? "<none>" : parentType.getTypeId()) +
|
logger.debug("Type " + objectTypeId + ": parent=" + (parentType == null ? "<none>" : parentType.getTypeId()) +
|
||||||
", internal parent=" + (internalParentType == null ? "<none>" : internalParentType.getTypeId()));
|
", internal parent=" + (internalParentType == null ? "<none>" : internalParentType.getTypeId()));
|
||||||
|
|
||||||
CMISTypeId rootTypeId = objectTypeId.getRootTypeId();
|
CMISTypeId rootTypeId = objectTypeId.getBaseTypeId();
|
||||||
if (rootTypeId != null)
|
if (rootTypeId != null)
|
||||||
{
|
{
|
||||||
rootType = registry.objectDefsByTypeId.get(rootTypeId);
|
rootType = registry.objectDefsByTypeId.get(rootTypeId);
|
||||||
@@ -288,7 +288,7 @@ public class CMISAbstractTypeDefinition implements CMISTypeDefinition, Serializa
|
|||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.alfresco.cmis.dictionary.CMISTypeDefinition#getRootType()
|
* @see org.alfresco.cmis.dictionary.CMISTypeDefinition#getRootType()
|
||||||
*/
|
*/
|
||||||
public CMISTypeDefinition getRootType()
|
public CMISTypeDefinition getBaseType()
|
||||||
{
|
{
|
||||||
return rootType;
|
return rootType;
|
||||||
}
|
}
|
||||||
|
@@ -38,7 +38,6 @@ import org.alfresco.cmis.CMISDictionaryModel;
|
|||||||
import org.alfresco.cmis.CMISPropertyId;
|
import org.alfresco.cmis.CMISPropertyId;
|
||||||
import org.alfresco.cmis.CMISScope;
|
import org.alfresco.cmis.CMISScope;
|
||||||
import org.alfresco.cmis.CMISTypeId;
|
import org.alfresco.cmis.CMISTypeId;
|
||||||
import org.alfresco.cmis.dictionary.CMISAbstractDictionaryService;
|
|
||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.service.ServiceRegistry;
|
import org.alfresco.service.ServiceRegistry;
|
||||||
@@ -67,7 +66,7 @@ public class CMISMapping implements InitializingBean
|
|||||||
/**
|
/**
|
||||||
* The Alfresco CMIS model URI.
|
* The Alfresco CMIS model URI.
|
||||||
*/
|
*/
|
||||||
public static String CMIS_MODEL_URI = "http://www.alfresco.org/model/cmis/0.5";
|
public static String CMIS_MODEL_URI = "http://www.alfresco.org/model/cmis/0.6";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Alfresco CMIS Model name.
|
* The Alfresco CMIS Model name.
|
||||||
@@ -80,8 +79,8 @@ public class CMISMapping implements InitializingBean
|
|||||||
public static QName CMIS_MODEL_QNAME = QName.createQName(CMIS_MODEL_URI, CMIS_MODEL_NAME);
|
public static QName CMIS_MODEL_QNAME = QName.createQName(CMIS_MODEL_URI, CMIS_MODEL_NAME);
|
||||||
|
|
||||||
// CMIS Internal Types
|
// CMIS Internal Types
|
||||||
public static String OBJECT_OBJECT_TYPE = "Object";
|
public static String OBJECT_OBJECT_TYPE = "object";
|
||||||
public static String FILESYSTEM_OBJECT_TYPE ="FileSystemObject";
|
public static String FILESYSTEM_OBJECT_TYPE ="filesystemobject";
|
||||||
|
|
||||||
// CMIS Data Types
|
// CMIS Data Types
|
||||||
public static QName CMIS_DATATYPE_ID = QName.createQName(CMIS_MODEL_URI, "id");
|
public static QName CMIS_DATATYPE_ID = QName.createQName(CMIS_MODEL_URI, "id");
|
||||||
|
@@ -29,7 +29,6 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.alfresco.cmis.CMISDictionaryService;
|
import org.alfresco.cmis.CMISDictionaryService;
|
||||||
import org.alfresco.cmis.CMISFullTextSearchEnum;
|
|
||||||
import org.alfresco.cmis.CMISJoinEnum;
|
import org.alfresco.cmis.CMISJoinEnum;
|
||||||
import org.alfresco.cmis.CMISQueryEnum;
|
import org.alfresco.cmis.CMISQueryEnum;
|
||||||
import org.alfresco.cmis.CMISQueryOptions;
|
import org.alfresco.cmis.CMISQueryOptions;
|
||||||
@@ -164,17 +163,7 @@ public class CMISQueryServiceImpl implements CMISQueryService
|
|||||||
*/
|
*/
|
||||||
public CMISQueryEnum getQuerySupport()
|
public CMISQueryEnum getQuerySupport()
|
||||||
{
|
{
|
||||||
return CMISQueryEnum.BOTH;
|
return CMISQueryEnum.BOTH_COMBINED;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.alfresco.cmis.search.CMISQueryService#getFullTextSearchSupport()
|
|
||||||
*/
|
|
||||||
public CMISFullTextSearchEnum getFullTextSearchSupport()
|
|
||||||
{
|
|
||||||
return CMISFullTextSearchEnum.FULL_TEXT_AND_STRUCTURED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user