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

@@ -1,418 +1,404 @@
<model name="cmis:cmismodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>CMIS Model Definitions</description>
<version>0.5</version>
<description>CMIS Model Definitions</description>
<version>0.5</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
</imports>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
</imports>
<namespaces>
<namespace uri="http://www.alfresco.org/model/cmis/0.5" prefix="cmis" />
</namespaces>
<namespaces>
<namespace uri="http://www.alfresco.org/model/cmis/0.5" prefix="cmis" />
</namespaces>
<data-types>
<data-type name="cmis:id">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
<data-type name="cmis:uri">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
<data-type name="cmis:xml">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
<data-type name="cmis:html">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
</data-types>
<constraints>
<data-types>
<data-type name="cmis:id">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
<data-type name="cmis:uri">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
<data-type name="cmis:xml">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
<data-type name="cmis:html">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
</data-types>
<constraints>
<constraint name="cmis:allowedValuesForContentStreamAllowed" type="LIST">
<parameter name="allowedValues">
<list>
<value>notallowed</value>
<value>allowed</value>
<value>required</value>
</list>
</parameter>
</constraint>
</constraints>
<types>
<type name="cmis:Object">
<properties>
<property name="cmis:ObjectId">
<title>Object Id</title>
<description>The unique object id (a node ref)</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:Uri">
<title>URI</title>
<description>URI</description>
<type>cmis:uri</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:ObjectTypeId">
<title>Object Type Id</title>
<description>The object type id</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:CreatedBy">
<title>Created by</title>
<description>The authority who created this object</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:CreationDate">
<title>Creation Date</title>
<description>The object creation date</description>
<type>d:datetime</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:LastModifiedBy">
<title>Last Modified By</title>
<description>The authority who last modified this object</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:LastModificationDate">
<title>Last Modified Date</title>
<description>The date this object was last modified</description>
<type>d:datetime</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:ChangeToken">
<title>Change token</title>
<description>Change Token</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
</properties>
</type>
<!-- TODO: mark as abstract -->
<type name="cmis:FileSystemObject">
<parent>cmis:Object</parent>
<properties>
<property name="cmis:Name">
<title>Name</title>
<description>Name</description>
<type>d:text</type>
<protected>false</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>both</tokenised>
</index>
</property>
</properties>
</type>
<type name="cmis:Document">
<title>Document</title>
<description>Document Type</description>
<parent>cmis:FileSystemObject</parent>
<properties>
<property name="cmis:IsImmutable">
<title>Is Immutable</title>
<description>Is the document immutable?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:IsLatestVersion">
<title>Is Latest Version</title>
<description>Is this the latest version of the document?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:IsMajorVersion">
<title>Is Major Version</title>
<description>Is this a major version of the document?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:IsLatestMajorVersion">
<title>Is Latest Major Version</title>
<description>Is this the latest major version of the document?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:VersionLabel">
<title>Version Label</title>
<description>The version label</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>true</tokenised>
</index>
</property>
<property name="cmis:VersionSeriesId">
<title>Version series id</title>
<description>The version series id</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:IsVersionSeriesCheckedOut">
<title>Is Version Series Checked Out</title>
<description>Is the version series checked out?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:VersionSeriesCheckedOutBy">
<title>Version Series Checked Out By</title>
<description>The authority who checked out this document version series</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:VersionSeriesCheckedOutId">
<title>Version Series Checked Out Id</title>
<description>The checked out version series id</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:CheckinComment">
<title>Checkin Comment</title>
<description>The checkin comment</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:ContentStreamAllowed">
<title>Content Stream Allowed</title>
<description>Is a content stream allowed?</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
<constraints>
<constraint ref="cmis:allowedValuesForContentStreamAllowed" />
</constraints>
</property>
<property name="cmis:ContentStreamLength">
<title>Content Stream Length</title>
<description>The length of the content stream</description>
<type>d:int</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:ContentStreamMimeType">
<title>Content Stream MIME Type</title>
<description>The content stream MIME type</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:ContentStreamFilename">
<title>Content Stream Filename</title>
<description>The content stream filename</description>
<type>d:text</type>
<protected>false</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>true</tokenised>
</index>
</property>
<property name="cmis:ContentStreamUri">
<title>Content Stream URI</title>
<description>The content stream URI</description>
<type>cmis:uri</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
</properties>
</type>
<type name="cmis:Folder">
<title>Folder</title>
<description>Folder Type</description>
<parent>cmis:FileSystemObject</parent>
<properties>
<property name="cmis:ParentId">
<title>Parent Id</title>
<description>The parent id of the folder</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:AllowedChildObjectTypeIds">
<title>Allowed Child Object Types Ids</title>
<description>The allowed child object type ids</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>true</multiple>
<index enabled="false" />
</property>
</properties>
</type>
<type name="cmis:Relationship">
<title>Relationship</title>
<description>Relationship Type</description>
<parent>cmis:Object</parent>
<properties>
<property name="cmis:SourceId">
<title>Source Id</title>
<description>The source id for the relationship</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:TargetId">
<title>Target Id</title>
<description>The target id for the relationship</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
</properties>
</type>
<type name="cmis:Policy">
<title>Policy</title>
<description>Policy Type</description>
<parent>cmis:Object</parent>
<properties>
<property name="cmis:PolicyName">
<title>Policy Name</title>
<description>The name of the policy</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:PolicyText">
<title>Policy Text</title>
<description>The policy text</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
</properties>
</type>
</types>
<constraint name="cmis:allowedValuesForContentStreamAllowed" type="LIST">
<parameter name="allowedValues">
<list>
<value>notallowed</value>
<value>allowed</value>
<value>required</value>
</list>
</parameter>
</constraint>
</constraints>
<types>
<type name="cmis:Document">
<title>Document</title>
<description>Document Type</description>
<properties>
<property name="cmis:IsImmutable">
<title>Is Immutable</title>
<description>Is the document immutable?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:IsLatestVersion">
<title>Is Latest Version</title>
<description>Is this the latest version of the document?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:IsMajorVersion">
<title>Is Major Version</title>
<description>Is this a major version of the document?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:IsLatestMajorVersion">
<title>Is Latest Major Version</title>
<description>Is this the latest major version of the document?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:VersionLabel">
<title>Version Label</title>
<description>The version label</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>true</tokenised>
</index>
</property>
<property name="cmis:VersionSeriesId">
<title>Version series id</title>
<description>The version series id</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:IsVersionSeriesCheckedOut">
<title>Is Version Series Checked Out</title>
<description>Is the version series checked out?</description>
<type>d:boolean</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:VersionSeriesCheckedOutBy">
<title>Version Series Checked Out By</title>
<description>The authority who checked out this document version series</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:VersionSeriesCheckedOutId">
<title>Version Series Checked Out Id</title>
<description>The checked out version series id</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:CheckinComment">
<title>Checkin Comment</title>
<description>The checkin comment</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:ContentStreamAllowed">
<title>Content Stream Allowed</title>
<description>Is a content stream allowed?</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
<constraints>
<constraint ref="cmis:allowedValuesForContentStreamAllowed" />
</constraints>
</property>
<property name="cmis:ContentStreamLength">
<title>Content Stream Length</title>
<description>The length of the content stream</description>
<type>d:int</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:ContentStreamMimeType">
<title>Content Stream MIME Type</title>
<description>The content stream MIME type</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:ContentStreamFilename">
<title>Content Stream Filename</title>
<description>The content stream filename</description>
<type>d:text</type>
<protected>false</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>true</tokenised>
</index>
</property>
<property name="cmis:ContentStreamUri">
<title>Content Stream URI</title>
<description>The content stream URI</description>
<type>cmis:uri</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
</properties>
<mandatory-aspects>
<aspect>cmis:Core</aspect>
<aspect>cmis:Named</aspect>
</mandatory-aspects>
</type>
<type name="cmis:Folder">
<title>Folder</title>
<description>Folder Type</description>
<properties>
<property name="cmis:ParentId">
<title>Parent Id</title>
<description>The parent id of the folder</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:AllowedChildObjectTypeIds">
<title>Allowed Child Object Types Ids</title>
<description>The allowed child object type ids</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>true</multiple>
<index enabled="false"/>
</property>
</properties>
<mandatory-aspects>
<aspect>cmis:Core</aspect>
<aspect>cmis:Named</aspect>
</mandatory-aspects>
</type>
<type name="cmis:Relationship">
<title>Relationship</title>
<description>Relationship Type</description>
<properties>
<property name="cmis:SourceId">
<title>Source Id</title>
<description>The source id for the relationship</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:TargetId">
<title>Target Id</title>
<description>The target id for the relationship</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
</properties>
<mandatory-aspects>
<aspect>cmis:Core</aspect>
</mandatory-aspects>
</type>
<type name="cmis:Policy">
<title>Policy</title>
<description>Policy Type</description>
<properties>
<property name="cmis:PolicyName">
<title>Policy Name</title>
<description>The name of the policy</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:PolicyText">
<title>Policy Text</title>
<description>The policy text</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
</properties>
<mandatory-aspects>
<aspect>cmis:Core</aspect>
</mandatory-aspects>
</type>
<type name="cmis:AspectPolicy">
<title>Aspect Policy</title>
<description>Aspect Policy Type</description>
<parent>cmis:Policy</parent>
</type>
</types>
<aspects>
<aspect name="cmis:Core">
<properties>
<property name="cmis:ObjectId">
<title>Object Id</title>
<description>The unique object id (a node ref)</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:Uri">
<title>URI</title>
<description>URI</description>
<type>cmis:uri</type>
<protected>true</protected>
<mandatory enforced="false">false</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
<property name="cmis:ObjectTypeId">
<title>Object Type Id</title>
<description>The object type id</description>
<type>cmis:id</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:CreatedBy">
<title>Created by</title>
<description>The authority who created this object</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:CreationDate">
<title>Creation Date</title>
<description>The object creation date</description>
<type>d:datetime</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:LastModifiedBy">
<title>Last Modified By</title>
<description>The authority who last modified this object</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:LastModificationDate">
<title>Last Modified Date</title>
<description>The date this object was last modified</description>
<type>d:datetime</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
<property name="cmis:ChangeToken">
<title>Change token</title>
<description>Change Token</description>
<type>d:text</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="false" />
</property>
</properties>
</aspect>
<aspect name="cmis:Named">
<properties>
<property name="cmis:Name">
<title>Name</title>
<description>Name</description>
<type>d:text</type>
<protected>false</protected>
<mandatory enforced="true">true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>both</tokenised>
</index>
</property>
</properties>
</aspect>
</aspects>
</model>