Refactor CMIS Dictionary part 2

- further simplification of CMISDictionaryService and fixup fallout
- added logging
- consolidate & fix property definition handling (only one definition per property)
- include support for aspect properties
- fix property.isInherited
- open up the door for types outside of CMIS doc, folder, rel & policy

Dictionary Service
- add isOverride() to PropertyDefinition

Invite Workflows
- ensure they create their own namespace for new types/props
- NOTE: the previous way uses a hole in the DictinaryService which has been there
        unnoticed for over 4 years, till now. At some point, the hole will be filled in.
        
Tests pass for CMIS REST / Web Services and Query.
Tests pass for Invitation Service.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13786 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2009-03-31 17:48:28 +00:00
parent 8581c334f9
commit 4e9c3a3d3a
29 changed files with 1130 additions and 935 deletions

View File

@@ -38,7 +38,7 @@ import org.alfresco.service.namespace.QName;
*
* @author davidc
*/
public class CMISStrictDictionaryService extends AbstractCMISDictionaryService
public class CMISStrictDictionaryService extends CMISAbstractDictionaryService
{
/*
* (non-Javadoc)
@@ -73,7 +73,7 @@ public class CMISStrictDictionaryService extends AbstractCMISDictionaryService
// create appropriate kind of type definition
ClassDefinition classDef = dictionaryService.getClass(cmisMapping.getCmisType(typeId.getQName()));
CMISObjectTypeDefinition objectTypeDef = null;
CMISAbstractTypeDefinition objectTypeDef = null;
if (typeId.getScope() == CMISScope.DOCUMENT)
{
objectTypeDef = new CMISDocumentTypeDefinition(cmisMapping, typeId, classDef);
@@ -91,6 +91,10 @@ public class CMISStrictDictionaryService extends AbstractCMISDictionaryService
{
objectTypeDef = new CMISPolicyTypeDefinition(cmisMapping, typeId, classDef);
}
else if (typeId.getScope() == CMISScope.OBJECT)
{
objectTypeDef = new CMISObjectTypeDefinition(cmisMapping, typeId, classDef, false);
}
registry.registerTypeDefinition(objectTypeDef);
}
@@ -112,7 +116,7 @@ public class CMISStrictDictionaryService extends AbstractCMISDictionaryService
// create appropriate kind of type definition
CMISTypeId typeId = cmisMapping.getCmisTypeId(CMISScope.RELATIONSHIP, classQName);
AssociationDefinition assocDef = dictionaryService.getAssociation(classQName);
CMISObjectTypeDefinition objectTypeDef = new CMISRelationshipTypeDefinition(cmisMapping, typeId, null, assocDef);
CMISAbstractTypeDefinition objectTypeDef = new CMISRelationshipTypeDefinition(cmisMapping, typeId, null, assocDef);
registry.registerTypeDefinition(objectTypeDef);
}