DataGenerators are declared for use in the <Application> sections of the configuration files. A DataGenerator is a component that produces data without any input, that is, data is produced when a data path is active, but is independent of the values at that path. Examples of generators are the AuthenticatedUserDataGenerator component, which produces the name of the currently-authenticated user (user in context) and the AuthenticatedPersonDataGenerator component, which produces the full name of the currently-authenticated user (person in context). For the complete set of built-in generators, see the org.alfresco.repo.audit.generator package or the auditModel.generator.* beans, which are declared in the audit-services-context.xml file.
The generators can be declared in-line, for example:
<DataGenerators> <DataGenerator name="currentUser" class="org.alfresco.repo.audit.generator.AuthenticatedUserDataGenerator"/> <DataGenerator name="personFullName" class="org.alfresco.repo.audit.generator.AuthenticatedPersonDataGenerator"/> </DataGenerators>
Or they can be declared in Spring configuration and referenced in the audit configuration (see the audit-services-context.xml file), for example:
<DataGenerators> <DataGenerator name="currentUser" registeredName="auditModel.generator.user"/> <DataGenerator name="personFullName" registeredName="auditModel.generator.personFullName"/> </DataGenerators>