I am creating a content model like this,but i am using only two properties namely, date and company name. For this,I need to create a property for each node, i think it leads to a code redunduncy and memory wastage, could any one knows how to make these properties declared as a common property called date and company name and how can i use all over the content model wherever its needed?
<type name="my:maintainence">
<title>Maintainence</title>
<parent>cm:content</parent>
</type>
<type name="my:manualAttendanceCivil">
<title>Manual Attendance Civil</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:dateCivil">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:companyNameCivil">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="my:manualAttendanceCommercial">
<title>Manual Attendance For Commercial</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:dateCommercial">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:companyNameCommercial">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="my:rmsFormat">
<title>RMS Format</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:rmsDate">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:zone">
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="my:companyNameForRms">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
That is what aspects are for. Define those properties in an aspect (or two separate aspects) and apply those aspects to multiple nodes or as mandatory aspects on multiple types...
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.