我已经尝试了一天左右的时间来扩展具有额外属性的人模型,但到目前为止,还没有成功。我遵循了这个旧教程,但无法正常工作。查看页面上的一些回复表明有人在 4.1 中尝试过但没有让它工作。我正在针对 4.2 进行测试。任何见解将不胜感激。
编辑:
我有以下 customContentModel.xml:
<model name="cm:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Professional Person Model</description>
<author></author>
<version>1.0</version>
<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
<import uri="http://www.syn.fr/model/person/ext" prefix="ppm"/>
</imports>
<types>
<type name="cm:person">
<title>Person</title>
<parent>cm:authority</parent>
<properties>
<!-- The tokenisation set here is ignored - it is fixed for this type -->
<!-- This is so you can not break person lookup -->
<property name="cm:userName">
<type>d:text</type>
<mandatory>true</mandatory>
<constraints>
<constraint ref="cm:userNameConstraint" />
</constraints>
</property>
<property name="cm:homeFolder">
<type>d:noderef</type>
<mandatory>true</mandatory>
</property>
<property name="cm:firstName">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="cm:lastName">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="cm:middleName">
<type>d:text</type>
</property>
<property name="cm:email">
<type>d:text</type>
</property>
<property name="cm:organizationId">
<type>d:text</type>
</property>
<property name="cm:homeFolderProvider">
<type>d:text</type>
</property>
<property name="cm:defaultHomeFolderPath">
<type>d:text</type>
</property>
<property name="cm:presenceProvider">
<type>d:text</type>
</property>
<property name="cm:presenceUsername">
<type>d:text</type>
</property>
<property name="cm:organization">
<type>d:text</type>
</property>
<property name="cm:jobtitle">
<type>d:text</type>
</property>
<property name="cm:location">
<type>d:text</type>
</property>
<property name="cm:persondescription">
<type>d:content</type>
</property>
<property name="cm:telephone">
<type>d:text</type>
</property>
<property name="cm:mobile">
<type>d:text</type>
</property>
<property name="cm:companyaddress1">
<type>d:text</type>
</property>
<property name="cm:companyaddress2">
<type>d:text</type>
</property>
<property name="cm:companyaddress3">
<type>d:text</type>
</property>
<property name="cm:companypostcode">
<type>d:text</type>
</property>
<property name="cm:companytelephone">
<type>d:text</type>
</property>
<property name="cm:companyfax">
<type>d:text</type>
</property>
<property name="cm:companyemail">
<type>d:text</type>
</property>
<property name="cm:skype">
<type>d:text</type>
</property>
<property name="cm:instantmsg">
<type>d:text</type>
</property>
<property name="cm:userStatus">
<type>d:text</type>
</property>
<property name="cm:userStatusTime">
<type>d:datetime</type>
</property>
<property name="cm:googleusername">
<type>d:text</type>
</property>
<property name="cm:emailFeedDisabled">
<type>d:boolean</type>
</property>
<property name="cm:subscriptionsPrivate">
<type>d:boolean</type>
</property>
<!-- system maintained / protected values -->
<property name="cm:emailFeedId">
<type>d:long</type>
<protected>true</protected>
</property>
<property name="cm:sizeCurrent">
<type>d:long</type>
<protected>true</protected>
<mandatory enforced="true">true</mandatory>
</property>
<property name="cm:sizeQuota">
<type>d:long</type>
<protected>true</protected>
</property>
</properties>
<associations>
<association name="cm:avatar">
<source>
<role>cm:avatarOf</role>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:content</class>
<role>cm:hasAvatar</role>
<mandatory>false</mandatory>
<many>false</many>
</target>
</association>
</associations>
</type>
<mandatory-aspects>
<aspect>ppm:attributes</aspect>
</mandatory-aspects>
</types>
</model>
我收到有关cm:authority的错误,说找不到。肯定所有 cm:* 命名空间对象都会在可扩展对象之前加载,因此 cm:authority 本身是否可用?