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="{}versionable" />
      <property name="predicate" value="{}troubleshooting" />
  3. Restart the application server for your changes to take effect.