Lab 6 - Configure a property synchronizer

During the lab, you will be configuring a new Property Synchronizer to synchronize the troubleshooting short description (ts:shortdesc) with the Alfresco description property (cm:description).

  1. In the lab folder, create a new Spring context file named context.xml.
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
    
    </beans>
  2. Open the context.xml file in your favorite editor.
  3. Create a new Property Synchronizer bean.
  4. Add the following properties to the Property Synchronizer bean as required:
    Property Type Mandatory Description
    properties Collection <QName> Required Collection of QNames identifying properties. Use a fully-qualified name with Clark notation as the key of the entry.
    <bean id="samples.ts.propertySynchronizer.description" parent="alfresco.node.propertySynchronizer.abstract" depends-on="samples.ts.model">
      <property name="properties">
        <list>
          <value>{http://www.componize.com/model/samples/troubleshooting/1.0/}shortdesc</value>
          <value>{http://www.alfresco.org/model/content/1.0}description</value>
        </list>
      </property>
    </bean>
  5. Save your changes.
  6. Test your Property Synchronizer with the com.componize.samples.lab06.PropertySynchronizerTest unit test.
  7. Deploy your files to the application server.
  8. Once the application server has started, connect to the Alfresco Share interface.
  9. Use the Edit Properties action on the troubleshooting-sample.dita file to modify the value of the ts:shortdesc property.
The cm:description property should be updated with the modified value.