mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Audit validation using XSD and related tests
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15875 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<!-- Default Audit Configuration -->
|
||||
|
||||
<Audit
|
||||
xmlns="http://www.alfresco.org/repo/audit/model/3.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd"
|
||||
>
|
||||
|
||||
<Application name="Alfresco Test Bad 01" key="test-bad-01">
|
||||
<AuditPath key="1.1">
|
||||
<AuditPath key="2.1">
|
||||
<RecordValue key="value.1" dataExtractor="blah"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</Application>
|
||||
|
||||
</Audit>
|
@@ -0,0 +1,19 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<!-- Default Audit Configuration -->
|
||||
|
||||
<Audit
|
||||
xmlns="http://www.alfresco.org/repo/audit/model/3.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd"
|
||||
>
|
||||
|
||||
<Application name="Alfresco Test Bad 02" key="test-bad-02">
|
||||
<AuditPath key="1.1">
|
||||
<AuditPath key="2.1">
|
||||
<GenerateValue key="value.1" dataGenerator="blah" scope="AUDIT"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</Application>
|
||||
|
||||
</Audit>
|
@@ -0,0 +1,22 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<!-- Default Audit Configuration -->
|
||||
|
||||
<Audit
|
||||
xmlns="http://www.alfresco.org/repo/audit/model/3.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd"
|
||||
>
|
||||
|
||||
<Application name="Alfresco Test Bad 03" key="test-bad-03">
|
||||
<AuditPath key="1.1">
|
||||
<AuditPath key="2.1">
|
||||
<RecordValue key="value.1" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
<AuditPath key="2.1">
|
||||
<RecordValue key="value.1" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</Application>
|
||||
|
||||
</Audit>
|
@@ -0,0 +1,19 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<!-- Default Audit Configuration -->
|
||||
|
||||
<Audit
|
||||
xmlns="http://www.alfresco.org/repo/audit/model/3.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd"
|
||||
>
|
||||
|
||||
<Application name="Alfresco Test Bad 04" key="test-bad-04">
|
||||
<AuditPath key="1.1">
|
||||
<AuditPath key="2.1">
|
||||
<RecordValue key="value.UPPER" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</Application>
|
||||
|
||||
</Audit>
|
@@ -0,0 +1,19 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<!-- Default Audit Configuration -->
|
||||
|
||||
<Audit
|
||||
xmlns="http://www.alfresco.org/repo/audit/model/3.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd"
|
||||
>
|
||||
|
||||
<Application name="Alfresco Test Bad 05" key="test-bad-05">
|
||||
<AuditPath key="1.1">
|
||||
<AuditPath key="2.1">
|
||||
<GenerateValue key="time" dataGenerator="systemTime" scope="SESSIOn"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</Application>
|
||||
|
||||
</Audit>
|
66
source/test-resources/alfresco/audit/alfresco-audit-test.xml
Normal file
66
source/test-resources/alfresco/audit/alfresco-audit-test.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<!-- Default Audit Configuration -->
|
||||
|
||||
<Audit
|
||||
xmlns="http://www.alfresco.org/repo/audit/model/3.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd"
|
||||
>
|
||||
|
||||
<!-- Includes duplicate definitions of the extractors and generators -->
|
||||
|
||||
<DataExtractors>
|
||||
<DataExtractor name="simpleValue" class="org.alfresco.repo.audit.extractor.SimpleValueDataExtractor"/>
|
||||
</DataExtractors>
|
||||
|
||||
<DataGenerators>
|
||||
<DataGenerator name="systemTime" class="org.alfresco.repo.audit.generator.SystemTimeDataGenerator"/>
|
||||
</DataGenerators>
|
||||
|
||||
<Application name="Alfresco Test" key="test">
|
||||
<GenerateValue key="time" dataGenerator="systemTime" scope="SESSION"/>
|
||||
<AuditPath key="1.1">
|
||||
<AuditPath key="2.1">
|
||||
<AuditPath key="3.1">
|
||||
<RecordValue key="value.1" dataExtractor="simpleValue"/>
|
||||
<AuditPath key="4.1">
|
||||
<RecordValue key="value.1" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
<AuditPath key="4.2">
|
||||
<RecordValue key="value.2" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
<AuditPath key="3.2">
|
||||
<AuditPath key="4.1">
|
||||
<RecordValue key="value.1" dataExtractor="simpleValue"/>
|
||||
<GenerateValue key="time" dataGenerator="systemTime" scope="AUDIT"/>
|
||||
</AuditPath>
|
||||
<AuditPath key="4.2">
|
||||
<RecordValue key="value.1" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
<AuditPath key="2.2">
|
||||
<AuditPath key="3.1">
|
||||
<AuditPath key="4.1">
|
||||
<RecordValue key="value.1" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
<AuditPath key="4.2">
|
||||
<RecordValue key="value.2" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
<AuditPath key="3.2">
|
||||
<AuditPath key="4.1">
|
||||
<RecordValue key="value.1" dataExtractor="simpleValue"/>
|
||||
<GenerateValue key="time" dataGenerator="systemTime" scope="ALL"/>
|
||||
</AuditPath>
|
||||
<AuditPath key="4.2">
|
||||
<RecordValue key="value.1" dataExtractor="simpleValue"/>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</AuditPath>
|
||||
</Application>
|
||||
|
||||
</Audit>
|
Reference in New Issue
Block a user