Configuring a property synchronizer

You can synchronize property values automatically in Alfresco by defining a property synchronizer.

In the following steps you will be creating and/or configuring Spring beans in a Spring context file. A basic knowledge of Spring and the Spring Framework is required.

  1. Open or create a new Spring context file.
  2. Create a Namespace bean for the namespace used by the content model.

  3. Create a QName bean for each of the properties to synchronize.

  4. Create a Property Synchronizer bean.
    <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. Restart the application server for your changes to take effect.

Whenever one of the synchronized properties is modified in Alfresco, the other property values will be automatically updated with the same value.