Configuring an aspect predicate mapping

You can add an aspect automatically to a document based on a predicate by configuring an aspect predicate mapping bean.

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 an Aspect Predicate Mapping bean.
    The following example will add the cm:versionable aspect to a document if the extracted metadata for that document contains the ts:troubleshooting predicate.
    <bean id="samples.ts.predicateMapping.aspect.versionable" parent="alfresco.rdf.predicateMapping.aspect.abstract">
      <property name="aspect" value="{http://www.alfresco.org/model/content/1.0}versionable" />
      <property name="predicate" value="{http://www.componize.com/model/samples/troubleshooting/1.0/}troubleshooting" />
    </bean>
  3. Restart the application server for your changes to take effect.