03-23-2011 07:25 AM
<?xml version="1.0" encoding="UTF-8"?>
<!– Custom Model –>
<!– Note: This model is pre-configured to load at startup of the Repository. So, all custom –>
<!– types and aspects added here will automatically be registered –>
<model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Custom Model</description>
<author></author>
<version>1.0</version>
<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 –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
<namespaces>
<namespace uri="custom.model" prefix="custom"/>
</namespaces>
<constraints>
<constraint name="custom:name_length" type="LENGTH">
<parameter name="minLength">
<value>3</value>
</parameter>
<parameter name="maxLength">
<value>20</value>
</parameter>
</constraint>
<constraint name="custom:car_list" type="LIST">
<parameter name="allowedValues">
<list>
<value>Volkswagon Vento</value>
<value>Maruti</value>
<value>Tata Manza</value>
<value>Skoda Fabia</value>
<value>TATA Sumo</value>
</list>
</parameter>
</constraint>
</constraints>
<aspects>
<!– Definition of new Content Aspect: Car Details –>
<aspect name="custom:CarDetails">
<title>Car Details</title>
<properties>
<property name="custom:CarName">
<title>Car Name</title>
<type>d:text</type>
<protected>false</protected>
<mandatory>false</mandatory>
<multiple>false</multiple>
<index enabled="true">
<atomic>false</atomic>
<stored>false</stored>
<tokenised>true</tokenised>
</index>
<constraints>
<constraint ref="custom:name_length"/>
</constraints>
</property>
<property name="custom:CarModel">
<title>Car Model</title>
<type>d:text</type>
<constraints>
<constraint ref="custom:car_list"/>
</constraints>
</property>
<property name="custom:CarPrice">
<title>Car Price</title>
<type>d:text</type>
<constraints>
<constraint ref="custom:office_list"/>
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Registration of new models –>
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/customModel.xml</value>
</list>
</property>
</bean>
</beans>
<alfresco-config>
<!– Lists the custom aspect in business rules Action wizard –>
<config evaluator="string-compare" condition="Action Wizards">
<aspects>
<aspect name="custom:CarDetails"/>
</aspects>
</config>
<!– Displays the properties in view details page –>
<config evaluator="aspect-name" condition="custom:CustomerDetails">
<property-sheet>
<separator name="sepCust1" display-label="Customer Details" component-generator="HeaderSeparatorGenerator" />
<show-property name="custom:CustomerName"/>
<show-property name="custom:CustomerContactName"/>
<show-property name="custom:CarDetails"/>
<show-property name="custom:CustomerContactPhone"/>
<show-property name="custom:CustomerProjectID"/>
</property-sheet>
</config></alfresco-config>
04-06-2011 06:14 AM
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.