diff --git a/config/alfresco/audit-services-context.xml b/config/alfresco/audit-services-context.xml
index 89b78ba79e..853a6c191e 100644
--- a/config/alfresco/audit-services-context.xml
+++ b/config/alfresco/audit-services-context.xml
@@ -37,7 +37,7 @@
-
+
@@ -78,16 +78,38 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
classpath:alfresco/audit/alfresco-audit-repository.xml
-
+
\ No newline at end of file
diff --git a/config/alfresco/audit/alfresco-audit-3.2.xsd b/config/alfresco/audit/alfresco-audit-3.2.xsd
index 85125894f7..d79038a1e0 100644
--- a/config/alfresco/audit/alfresco-audit-3.2.xsd
+++ b/config/alfresco/audit/alfresco-audit-3.2.xsd
@@ -30,7 +30,8 @@
-
+
+
@@ -41,7 +42,8 @@
-
+
+
@@ -94,7 +96,7 @@
-
+
diff --git a/config/alfresco/bootstrap-context.xml b/config/alfresco/bootstrap-context.xml
index 819b5c8b6b..415079a0e5 100644
--- a/config/alfresco/bootstrap-context.xml
+++ b/config/alfresco/bootstrap-context.xml
@@ -497,7 +497,7 @@
-
+
diff --git a/source/java/org/alfresco/repo/audit/AuditBootstrapTest.java b/source/java/org/alfresco/repo/audit/AuditBootstrapTest.java
index d03f546c1a..b566dc9745 100644
--- a/source/java/org/alfresco/repo/audit/AuditBootstrapTest.java
+++ b/source/java/org/alfresco/repo/audit/AuditBootstrapTest.java
@@ -58,7 +58,7 @@ public class AuditBootstrapTest extends TestCase
@Override
public void setUp() throws Exception
{
- auditModelRegistry = (AuditModelRegistry) ctx.getBean("auditModel.registry");
+ auditModelRegistry = (AuditModelRegistry) ctx.getBean("auditModel.modelRegistry");
// Register a new model
URL testModelUrl = ResourceUtils.getURL("classpath:alfresco/audit/alfresco-audit-test.xml");
diff --git a/source/java/org/alfresco/repo/audit/AuditComponentTest.java b/source/java/org/alfresco/repo/audit/AuditComponentTest.java
index 8b2f8a6443..99b8d6163e 100644
--- a/source/java/org/alfresco/repo/audit/AuditComponentTest.java
+++ b/source/java/org/alfresco/repo/audit/AuditComponentTest.java
@@ -26,6 +26,7 @@ package org.alfresco.repo.audit;
import java.io.Serializable;
import java.net.URL;
+import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -63,7 +64,7 @@ public class AuditComponentTest extends TestCase
@Override
public void setUp() throws Exception
{
- auditModelRegistry = (AuditModelRegistry) ctx.getBean("auditModel.registry");
+ auditModelRegistry = (AuditModelRegistry) ctx.getBean("auditModel.modelRegistry");
auditComponent = (AuditComponent) ctx.getBean("auditComponent");
transactionService = (TransactionService) ctx.getBean("transactionService");
@@ -71,6 +72,15 @@ public class AuditComponentTest extends TestCase
URL testModelUrl = ResourceUtils.getURL("classpath:alfresco/audit/alfresco-audit-test.xml");
auditModelRegistry.registerModel(testModelUrl);
auditModelRegistry.loadAuditModels();
+
+ // Authenticate
+ AuthenticationUtil.setFullyAuthenticatedUser("User-" + getName() + System.currentTimeMillis());
+ }
+
+ @Override
+ public void tearDown() throws Exception
+ {
+ AuthenticationUtil.clearCurrentSecurityContext();
}
public void testSetUp()
@@ -126,7 +136,7 @@ public class AuditComponentTest extends TestCase
/**
* Start a session and use it within a single txn
*/
- public void testBasicSession() throws Exception
+ public void testSession_Basic() throws Exception
{
final RetryingTransactionCallback testCallback = new RetryingTransactionCallback()
{
@@ -137,6 +147,7 @@ public class AuditComponentTest extends TestCase
Map values = new HashMap(13);
values.put("/test/1.1/2.1/3.1/4.1", new Long(41));
values.put("/test/1.1/2.1/3.1/4.2", "42");
+ values.put("/test/1.1/2.1/3.1/4.2", new Date());
auditComponent.audit(session, values);
@@ -150,6 +161,37 @@ public class AuditComponentTest extends TestCase
return transactionService.getRetryingTransactionHelper().doInTransaction(testCallback);
}
};
- AuthenticationUtil.runAs(testRunAs, "Peanut");
+ AuthenticationUtil.runAs(testRunAs, "SomeOtherUser");
+ }
+
+ /**
+ * Start a session and use it within a single txn
+ */
+ public void testSession_Extended01() throws Exception
+ {
+ final RetryingTransactionCallback testCallback = new RetryingTransactionCallback()
+ {
+ public Void execute() throws Throwable
+ {
+ AuditSession session = auditComponent.startAuditSession(APPLICATION_TEST, "/test/1.1");
+
+ Map values = new HashMap(13);
+ values.put("/test/1.1/2.1/3.1/4.1", new Long(41));
+ values.put("/test/1.1/2.1/3.1/4.2", "42");
+ values.put("/test/1.1/2.1/3.1/4.2", new Date());
+
+ auditComponent.audit(session, values);
+
+ return null;
+ }
+ };
+ RunAsWork testRunAs = new RunAsWork()
+ {
+ public Void doWork() throws Exception
+ {
+ return transactionService.getRetryingTransactionHelper().doInTransaction(testCallback);
+ }
+ };
+ AuthenticationUtil.runAs(testRunAs, "SomeOtherUser");
}
}
diff --git a/source/java/org/alfresco/repo/audit/extractor/AbstractDataExtractor.java b/source/java/org/alfresco/repo/audit/extractor/AbstractDataExtractor.java
index 3c46ebcb4f..46f65d0721 100644
--- a/source/java/org/alfresco/repo/audit/extractor/AbstractDataExtractor.java
+++ b/source/java/org/alfresco/repo/audit/extractor/AbstractDataExtractor.java
@@ -24,14 +24,51 @@
*/
package org.alfresco.repo.audit.extractor;
+import org.alfresco.util.PropertyCheck;
+import org.alfresco.util.registry.NamedObjectRegistry;
+import org.springframework.beans.factory.BeanNameAware;
+import org.springframework.beans.factory.InitializingBean;
+
/**
* Abstract implementation to provide support.
*
* @author Derek Hulley
* @since 3.2
*/
-public abstract class AbstractDataExtractor implements DataExtractor
+public abstract class AbstractDataExtractor implements DataExtractor, InitializingBean, BeanNameAware
{
+ private String name;
+ private NamedObjectRegistry registry;
+
+ /**
+ * Set the name with which to {@link #setRegistry(NamedObjectRegistry) register}
+ * @param name the name of the bean
+ */
+ public void setBeanName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Set the registry with which to register
+ * @param registry
+ */
+ public void setRegistry(NamedObjectRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ /**
+ * Registers the instance
+ */
+ public void afterPropertiesSet() throws Exception
+ {
+ PropertyCheck.mandatory(this, "name", name);
+ PropertyCheck.mandatory(this, "registry", registry);
+
+ registry.register(name, this);
+ }
+
/**
* This implementation assumes all extractors are stateless i.e. if the class matches
* then the instances are equal.
diff --git a/source/java/org/alfresco/repo/audit/generator/AbstractDataGenerator.java b/source/java/org/alfresco/repo/audit/generator/AbstractDataGenerator.java
index 8b96127dc6..d47a60a16c 100644
--- a/source/java/org/alfresco/repo/audit/generator/AbstractDataGenerator.java
+++ b/source/java/org/alfresco/repo/audit/generator/AbstractDataGenerator.java
@@ -24,14 +24,51 @@
*/
package org.alfresco.repo.audit.generator;
+import org.alfresco.util.PropertyCheck;
+import org.alfresco.util.registry.NamedObjectRegistry;
+import org.springframework.beans.factory.BeanNameAware;
+import org.springframework.beans.factory.InitializingBean;
+
/**
* Abstract implementation to provide support.
*
* @author Derek Hulley
* @since 3.2
*/
-public abstract class AbstractDataGenerator implements DataGenerator
+public abstract class AbstractDataGenerator implements DataGenerator, InitializingBean, BeanNameAware
{
+ private String name;
+ private NamedObjectRegistry registry;
+
+ /**
+ * Set the name with which to {@link #setRegistry(NamedObjectRegistry) register}
+ * @param name the name of the bean
+ */
+ public void setBeanName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Set the registry with which to register
+ * @param registry
+ */
+ public void setRegistry(NamedObjectRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ /**
+ * Registers the instance
+ */
+ public void afterPropertiesSet() throws Exception
+ {
+ PropertyCheck.mandatory(this, "name", name);
+ PropertyCheck.mandatory(this, "registry", registry);
+
+ registry.register(name, this);
+ }
+
/**
* This implementation assumes all generators are stateless i.e. if the class matches
* then the instances are equal.
diff --git a/source/java/org/alfresco/repo/audit/model/AuditModelRegistry.java b/source/java/org/alfresco/repo/audit/model/AuditModelRegistry.java
index 7a0e9763d7..1c453ecb07 100644
--- a/source/java/org/alfresco/repo/audit/model/AuditModelRegistry.java
+++ b/source/java/org/alfresco/repo/audit/model/AuditModelRegistry.java
@@ -58,6 +58,8 @@ import org.alfresco.repo.domain.audit.AuditDAO;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.transaction.TransactionService;
+import org.alfresco.util.PropertyCheck;
+import org.alfresco.util.registry.NamedObjectRegistry;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.ResourceUtils;
@@ -80,6 +82,8 @@ public class AuditModelRegistry
private TransactionService transactionService;
private AuditDAO auditDAO;
+ private NamedObjectRegistry dataExtractors;
+ private NamedObjectRegistry dataGenerators;
private final ReentrantReadWriteLock.ReadLock readLock;
private final ReentrantReadWriteLock.WriteLock writeLock;
@@ -87,8 +91,6 @@ public class AuditModelRegistry
private final Set auditModelUrls;
private final List auditModels;
- private final Map dataExtractorsByName;
- private final Map dataGeneratorsByName;
/**
* Used to lookup the audit application java hierarchy
*/
@@ -111,8 +113,6 @@ public class AuditModelRegistry
auditModelUrls = new HashSet(7);
auditModels = new ArrayList(7);
- dataExtractorsByName = new HashMap(13);
- dataGeneratorsByName = new HashMap(13);
auditApplicationsByName = new HashMap(7);
auditModelIdsByApplicationsName = new HashMap(7);
}
@@ -133,6 +133,33 @@ public class AuditModelRegistry
this.auditDAO = auditDAO;
}
+ /**
+ * Set the registry of {@link DataExtractor data extractors}
+ */
+ public void setDataExtractors(NamedObjectRegistry dataExtractors)
+ {
+ this.dataExtractors = dataExtractors;
+ }
+
+ /**
+ * Set the registry of {@link DataGenerator data generators}
+ */
+ public void setDataGenerators(NamedObjectRegistry dataGenerators)
+ {
+ this.dataGenerators = dataGenerators;
+ }
+
+ /**
+ * Ensures that all properties have been set for use.
+ */
+ private void checkProperties()
+ {
+ PropertyCheck.mandatory(this, "transactionService", transactionService);
+ PropertyCheck.mandatory(this, "auditDAO", auditDAO);
+ PropertyCheck.mandatory(this, "dataExtractors", dataExtractors);
+ PropertyCheck.mandatory(this, "dataGenerators", dataGenerators);
+ }
+
/**
* Register an audit model at a given URL.
*
@@ -140,6 +167,7 @@ public class AuditModelRegistry
*/
public void registerModel(URL auditModelUrl)
{
+ checkProperties();
writeLock.lock();
try
{
@@ -162,6 +190,7 @@ public class AuditModelRegistry
*/
public void registerModel(NodeRef auditModelNodeRef)
{
+ checkProperties();
writeLock.lock();
try
{
@@ -179,8 +208,6 @@ public class AuditModelRegistry
private void clearCaches()
{
auditModels.clear();
- dataExtractorsByName.clear();
- dataGeneratorsByName.clear();;
auditApplicationsByName.clear();
auditModelIdsByApplicationsName.clear();
}
@@ -194,6 +221,8 @@ public class AuditModelRegistry
*/
public void loadAuditModels()
{
+ checkProperties();
+
RetryingTransactionCallback loadModelsCallback = new RetryingTransactionCallback()
{
public Void execute() throws Throwable
@@ -365,42 +394,58 @@ public class AuditModelRegistry
private void cacheAuditElements(Long auditModelId, Audit audit)
{
+ Map dataExtractorsByName = new HashMap(13);
+ Map dataGeneratorsByName = new HashMap(13);
+
// Get the data extractors and check for duplicates
DataExtractors extractorsElement = audit.getDataExtractors();
if (extractorsElement == null)
{
extractorsElement = objectFactory.createDataExtractors();
}
- List converterElements = extractorsElement.getDataExtractor();
- for (org.alfresco.repo.audit.model._3.DataExtractor converterElement : converterElements)
+ List extractorElements = extractorsElement.getDataExtractor();
+ for (org.alfresco.repo.audit.model._3.DataExtractor extractorElement : extractorElements)
{
- String name = converterElement.getName();
- // Construct the converter
- final DataExtractor dataExtractor;
- try
- {
- Class> dataExtractorClazz = Class.forName(converterElement.getClazz());
- dataExtractor = (DataExtractor) dataExtractorClazz.newInstance();
- }
- catch (ClassNotFoundException e)
- {
- throw new AuditModelException(
- "Audit data extractor '" + name + "' class not found: " + converterElement.getClazz());
- }
- catch (Exception e)
- {
- throw new AuditModelException(
- "Audit data extractor '" + name + "' could not be constructed: " + converterElement.getClazz());
- }
+ String name = extractorElement.getName();
// If the name is taken, make sure that they are equal
if (dataExtractorsByName.containsKey(name))
{
- DataExtractor existing = dataExtractorsByName.get(name);
- if (!existing.equals(dataExtractor))
+ throw new AuditModelException(
+ "Audit data extractor '" + name + "' has already been defined.");
+ }
+ // Construct the converter
+ final DataExtractor dataExtractor;
+ if (extractorElement.getClazz() != null)
+ {
+ try
+ {
+ Class> dataExtractorClazz = Class.forName(extractorElement.getClazz());
+ dataExtractor = (DataExtractor) dataExtractorClazz.newInstance();
+ }
+ catch (ClassNotFoundException e)
{
throw new AuditModelException(
- "Audit data extractor '" + name + "' is incompatible with an existing instance.");
+ "Audit data extractor '" + name + "' class not found: " + extractorElement.getClazz());
}
+ catch (Exception e)
+ {
+ throw new AuditModelException(
+ "Audit data extractor '" + name + "' could not be constructed: " + extractorElement.getClazz());
+ }
+ }
+ else if (extractorElement.getRegisteredName() != null)
+ {
+ dataExtractor = dataExtractors.getNamedObject(extractorElement.getRegisteredName());
+ if (dataExtractor == null)
+ {
+ throw new AuditModelException(
+ "No registered audit data extractor exists for '" + name + "'.");
+ }
+ }
+ else
+ {
+ throw new AuditModelException(
+ "Audit data extractor has no class or registered name: " + name);
}
// Store
dataExtractorsByName.put(name, dataExtractor);
@@ -415,32 +460,45 @@ public class AuditModelRegistry
for (org.alfresco.repo.audit.model._3.DataGenerator generatorElement : generatorElements)
{
String name = generatorElement.getName();
- // Construct the converter
- final DataGenerator dataGenerator;
- try
- {
- Class> dataExtractorClazz = Class.forName(generatorElement.getClazz());
- dataGenerator = (DataGenerator) dataExtractorClazz.newInstance();
- }
- catch (ClassNotFoundException e)
- {
- throw new AuditModelException(
- "Audit data generator '" + name + "' class not found: " + generatorElement.getClazz());
- }
- catch (Exception e)
- {
- throw new AuditModelException(
- "Audit data generator '" + name + "' could not be constructed: " + generatorElement.getClazz());
- }
// If the name is taken, make sure that they are equal
if (dataGeneratorsByName.containsKey(name))
{
- DataGenerator existing = dataGeneratorsByName.get(name);
- if (!existing.equals(dataGenerator))
+ throw new AuditModelException(
+ "Audit data generator '" + name + "' has already been defined.");
+ }
+ // Construct the generator
+ final DataGenerator dataGenerator;
+ if (generatorElement.getClazz() != null)
+ {
+ try
+ {
+ Class> dataGeneratorClazz = Class.forName(generatorElement.getClazz());
+ dataGenerator = (DataGenerator) dataGeneratorClazz.newInstance();
+ }
+ catch (ClassNotFoundException e)
{
throw new AuditModelException(
- "Audit data generator '" + name + "' is incompatible with an existing instance.");
+ "Audit data generator '" + name + "' class not found: " + generatorElement.getClazz());
}
+ catch (Exception e)
+ {
+ throw new AuditModelException(
+ "Audit data generator '" + name + "' could not be constructed: " + generatorElement.getClazz());
+ }
+ }
+ else if (generatorElement.getRegisteredName() != null)
+ {
+ dataGenerator = dataGenerators.getNamedObject(generatorElement.getRegisteredName());
+ if (dataGenerator == null)
+ {
+ throw new AuditModelException(
+ "No registered audit data generator exists for '" + name + "'.");
+ }
+ }
+ else
+ {
+ throw new AuditModelException(
+ "Audit data generator has no class or registered name: " + name);
}
// Store
dataGeneratorsByName.put(name, dataGenerator);
diff --git a/source/java/org/alfresco/repo/audit/model/_3/DataExtractor.java b/source/java/org/alfresco/repo/audit/model/_3/DataExtractor.java
index 746584e92e..ff8fde64e2 100644
--- a/source/java/org/alfresco/repo/audit/model/_3/DataExtractor.java
+++ b/source/java/org/alfresco/repo/audit/model/_3/DataExtractor.java
@@ -16,7 +16,8 @@ import javax.xml.bind.annotation.XmlType;
* <complexType name="DataExtractor">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="name" type="{http://www.alfresco.org/repo/audit/model/3.2}NameAttribute" />
+ * <attribute name="name" use="required" type="{http://www.alfresco.org/repo/audit/model/3.2}NameAttribute" />
+ * <attribute name="registeredName" type="{http://www.alfresco.org/repo/audit/model/3.2}NameAttribute" />
* <attribute name="class" type="{http://www.alfresco.org/repo/audit/model/3.2}ClassAttribute" />
* </restriction>
* </complexContent>
@@ -29,8 +30,10 @@ import javax.xml.bind.annotation.XmlType;
@XmlType(name = "DataExtractor")
public class DataExtractor {
- @XmlAttribute
+ @XmlAttribute(required = true)
protected String name;
+ @XmlAttribute
+ protected String registeredName;
@XmlAttribute(name = "class")
protected String clazz;
@@ -58,6 +61,30 @@ public class DataExtractor {
this.name = value;
}
+ /**
+ * Gets the value of the registeredName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRegisteredName() {
+ return registeredName;
+ }
+
+ /**
+ * Sets the value of the registeredName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRegisteredName(String value) {
+ this.registeredName = value;
+ }
+
/**
* Gets the value of the clazz property.
*
diff --git a/source/java/org/alfresco/repo/audit/model/_3/DataGenerator.java b/source/java/org/alfresco/repo/audit/model/_3/DataGenerator.java
index 3c8ef65b28..3814f868a1 100644
--- a/source/java/org/alfresco/repo/audit/model/_3/DataGenerator.java
+++ b/source/java/org/alfresco/repo/audit/model/_3/DataGenerator.java
@@ -16,7 +16,8 @@ import javax.xml.bind.annotation.XmlType;
* <complexType name="DataGenerator">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="name" type="{http://www.alfresco.org/repo/audit/model/3.2}NameAttribute" />
+ * <attribute name="name" use="required" type="{http://www.alfresco.org/repo/audit/model/3.2}NameAttribute" />
+ * <attribute name="registeredName" type="{http://www.alfresco.org/repo/audit/model/3.2}NameAttribute" />
* <attribute name="class" type="{http://www.alfresco.org/repo/audit/model/3.2}ClassAttribute" />
* </restriction>
* </complexContent>
@@ -29,8 +30,10 @@ import javax.xml.bind.annotation.XmlType;
@XmlType(name = "DataGenerator")
public class DataGenerator {
- @XmlAttribute
+ @XmlAttribute(required = true)
protected String name;
+ @XmlAttribute
+ protected String registeredName;
@XmlAttribute(name = "class")
protected String clazz;
@@ -58,6 +61,30 @@ public class DataGenerator {
this.name = value;
}
+ /**
+ * Gets the value of the registeredName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRegisteredName() {
+ return registeredName;
+ }
+
+ /**
+ * Sets the value of the registeredName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRegisteredName(String value) {
+ this.registeredName = value;
+ }
+
/**
* Gets the value of the clazz property.
*
diff --git a/source/java/org/alfresco/repo/audit/model/_3/ObjectFactory.java b/source/java/org/alfresco/repo/audit/model/_3/ObjectFactory.java
index 2828f80fd4..971701d3d9 100644
--- a/source/java/org/alfresco/repo/audit/model/_3/ObjectFactory.java
+++ b/source/java/org/alfresco/repo/audit/model/_3/ObjectFactory.java
@@ -34,51 +34,11 @@ public class ObjectFactory {
}
/**
- * Create an instance of {@link KeyedAuditDefinition }
+ * Create an instance of {@link Application }
*
*/
- public KeyedAuditDefinition createKeyedAuditDefinition() {
- return new KeyedAuditDefinition();
- }
-
- /**
- * Create an instance of {@link DataExtractor }
- *
- */
- public DataExtractor createDataExtractor() {
- return new DataExtractor();
- }
-
- /**
- * Create an instance of {@link Audit }
- *
- */
- public Audit createAudit() {
- return new Audit();
- }
-
- /**
- * Create an instance of {@link DataExtractors }
- *
- */
- public DataExtractors createDataExtractors() {
- return new DataExtractors();
- }
-
- /**
- * Create an instance of {@link AuditPath }
- *
- */
- public AuditPath createAuditPath() {
- return new AuditPath();
- }
-
- /**
- * Create an instance of {@link DataGenerator }
- *
- */
- public DataGenerator createDataGenerator() {
- return new DataGenerator();
+ public Application createApplication() {
+ return new Application();
}
/**
@@ -89,6 +49,22 @@ public class ObjectFactory {
return new DataGenerators();
}
+ /**
+ * Create an instance of {@link DataExtractor }
+ *
+ */
+ public DataExtractor createDataExtractor() {
+ return new DataExtractor();
+ }
+
+ /**
+ * Create an instance of {@link AuditPath }
+ *
+ */
+ public AuditPath createAuditPath() {
+ return new AuditPath();
+ }
+
/**
* Create an instance of {@link RecordValue }
*
@@ -97,14 +73,6 @@ public class ObjectFactory {
return new RecordValue();
}
- /**
- * Create an instance of {@link Application }
- *
- */
- public Application createApplication() {
- return new Application();
- }
-
/**
* Create an instance of {@link GenerateValue }
*
@@ -113,6 +81,38 @@ public class ObjectFactory {
return new GenerateValue();
}
+ /**
+ * Create an instance of {@link Audit }
+ *
+ */
+ public Audit createAudit() {
+ return new Audit();
+ }
+
+ /**
+ * Create an instance of {@link KeyedAuditDefinition }
+ *
+ */
+ public KeyedAuditDefinition createKeyedAuditDefinition() {
+ return new KeyedAuditDefinition();
+ }
+
+ /**
+ * Create an instance of {@link DataExtractors }
+ *
+ */
+ public DataExtractors createDataExtractors() {
+ return new DataExtractors();
+ }
+
+ /**
+ * Create an instance of {@link DataGenerator }
+ *
+ */
+ public DataGenerator createDataGenerator() {
+ return new DataGenerator();
+ }
+
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Audit }{@code >}}
*
diff --git a/source/test-resources/alfresco/audit/alfresco-audit-test.xml b/source/test-resources/alfresco/audit/alfresco-audit-test.xml
index bb65363dec..2dbb536cde 100644
--- a/source/test-resources/alfresco/audit/alfresco-audit-test.xml
+++ b/source/test-resources/alfresco/audit/alfresco-audit-test.xml
@@ -11,11 +11,12 @@
-
+
-
+
+
@@ -63,6 +64,11 @@
+
+
+
+
+
\ No newline at end of file