07-04-2011 06:59 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>
<aspects>
<!– Definition of new Content Aspect: Customer Details –>
<aspect name="custom:CustomerDetails">
<title>Customer Details</title>
<properties>
<property name="custom:CustomerName">
<title>Customer Name</title>
<type>d:text</type>
<protected>false</protected>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
</properties>
</aspect>
</aspects>
</model>
<!– Lists the custom aspect in business rules Action wizard –>
<config evaluator="string-compare" condition="Action Wizards">
<aspects>
<aspect name="custom:CustomerDetails"/>
</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"/>
</property-sheet>
</config>
</alfresco-config>
3. added property to 'custom-metadata-extrators-context.xml'<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!–
This sample show how to modify the mappings properties of the new V2.1 Metadata Extractors.
In this example, in addition to the default mappings, the field 'user1' is mapped to
'cm:description'. The available source properties is described on the Javadocs of the
extracter class.
–>
<beans>
<bean id="extracter.Office" class="org.alfresco.repo.content.metadata.OfficeMetadataExtracter" parent="baseMetadataExtracter" >
<property name="inheritDefaultMapping">
<value>true</value>
</property>
<property name="mappingProperties">
<bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="location">
<value>classpath:alfresco/extension/custom-office-document-extractor-mappings.properties</value>
</property>
</bean>
</property>
</bean>
</beans>
custom-office-document-extractor-mappings.propertiesnamespace.prefix.custom=custom.model
customerid=custom:CustomerName
07-04-2011 12:55 PM
namespace.prefix.custom=custom.model
Keywords=custom:CustomerName
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.