12-06-2007 06:47 AM
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="rt:regtosmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Some Model</description>
<author>Sombody</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" />
</imports>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri="http://www.some.company.it/model/content/1.0" prefix="rt" />
</namespaces>
<constraints>
<constraint name="rt:conttype" type="LIST">
<parameter name="allowedValues">
<list>
<value>tab</value>
<value>description</value>
<value>image</value>
</list>
</parameter>
</constraint>
</constraints>
<types>
<!– Enterprise-wide generic document type –>
<type name="rt:doc">
<title>Some Company documents</title>
<parent>cm:content</parent>
<mandatory-aspects>
<aspect>cm:generalclassifiable</aspect>
<aspect>rt:typed</aspect>
</mandatory-aspects>
</type>
<type name="rt:tab">
<title>Generic tab</title>
<parent>rt:doc</parent>
<mandatory-aspects>
<aspect>cm:versionable</aspect>
<aspect>rt:linkable</aspect>
</mandatory-aspects>
</type>
<type name="rt:description">
<title>Descriptive text</title>
<parent>rt:doc</parent>
<mandatory-aspects>
<aspect>cm:versionable</aspect>
</mandatory-aspects>
</type>
<type name="rt:image">
<title>Image</title>
<parent>rt:doc</parent>
</type>
</types>
<aspects>
<aspect name="rt:webable">
<title>Some Company webable</title>
<properties>
<property name="rtublished">
<type>d:date</type>
</property>
<property name="rt:isActive">
<type>d:boolean</type>
<default>false</default>
</property>
</properties>
</aspect>
<aspect name="rt:linkable">
<title>Some Company linkable</title>
<associations>
<child-association name="rt:link_description">
<title>Linked description</title>
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>rt:description</class>
<mandatory>false</mandatory>
<many>false</many>
</target>
</child-association>
<child-association name="rt:link_image">
<title>Linked image(s)</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>rt:image</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</child-association>
</associations>
</aspect>
<aspect name="rt:typed">
<title>Some Company typedable</title>
<properties>
<property name="rt:type">
<type>d:text</type>
<constraints>
<constraint ref="rt:conttype" />
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>
<alfresco-config>
<!– add webable aspect properties to property sheet –>
<config evaluator="aspect-name" condition="rt:webable">
<property-sheet>
<show-property name="rtublished" display-label-id="published" />
<show-property name="rt:isActive" display-label-id="isActive" read-only="true" />
</property-sheet>
</config>
<!– show related documents association on schedaparco property sheet –>
<config evaluator="node-type" condition="rt:tab">
<property-sheet>
<show-property name="rt:type" display-label-id="type" />
<show-child-association name="rt:link_description" />
<show-child-association name="rt:link_image" />
</property-sheet>
</config>
<config evaluator="node-type" condition="rt:description">
<property-sheet>
<show-property name="rt:type" display-label-id="type" />
</property-sheet>
</config>
<config evaluator="node-type" condition="rt:image">
<property-sheet>
<show-property name="rt:type" display-label-id="type" />
</property-sheet>
</config>
<!– add someco types to add content list –>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="rt:doc" />
<type name="rt:tab" />
<type name="rt:description" />
<type name="rt:image" />
</content-types>
</config>
<config evaluator="string-compare" condition="Action Wizards">
<!– The list of aspects to show in the add/remove features action –>
<!– and the has-aspect condition –>
<aspects>
<aspect name="rt:webable"/>
</aspects>
<!– The list of types shown in the is-subtype condition –>
<subtypes>
<type name="rt:doc" />
<type name="rt:tab" />
<type name="rt:description" />
<type name="rt:image" />
</subtypes>
<!– The list of content and/or folder types shown in the specialise-type action –>
<specialise-types>
<type name="rt:doc" />
<type name="rt:tab" />
<type name="rt:description" />
<type name="rt:image" />
</specialise-types>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="rt:doc" />
<type name="rt:tab" />
<type name="rt:description" />
<type name="rt:image" />
</content-types>
<custom-properties>
<meta-data property="rt:type" display-label-id="type" />
<meta-data aspect="rt:webable" property="rtublished" display-label-id="published" />
<meta-data aspect="rt:webable" property="rt:isActive" display-label-id="isActive" />
</custom-properties>
</advanced-search>
</config>
</alfresco-config>
12-07-2007 11:18 AM
12-07-2007 01:41 PM
12-10-2007 03:46 AM
12-17-2007 10:58 AM
03-18-2010 08:04 AM
If the items already exist in the repository before creating the child association that links them, the child association is not primary. As a consequence removing the Tab won't remove its children. This behaviour is normal in Alfresco : only the first (structural) child association involves cascade delete.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.