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:
Derek Hulley
2009-08-24 20:10:49 +00:00
parent b8c93f89f3
commit 598ecfb27b
27 changed files with 1112 additions and 224 deletions

View File

@@ -57,7 +57,6 @@
<xs:complexContent>
<xs:extension base="a:KeyedAuditDefinition">
<xs:sequence>
<xs:element name="AuditSession" type="a:AuditSession" minOccurs="0" maxOccurs="1"/>
<xs:element name="RecordValue" type="a:RecordValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="GenerateValue" type="a:GenerateValue" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="AuditPath" type="a:AuditPath" minOccurs="0" maxOccurs="unbounded"/>
@@ -66,12 +65,6 @@
</xs:complexContent>
</xs:complexType>
<xs:complexType name="AuditSession">
<xs:sequence>
<xs:element name="GenerateValue" type="a:GenerateValue" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RecordValue">
<xs:complexContent>
<xs:extension base="a:KeyedAuditDefinition">
@@ -84,6 +77,7 @@
<xs:complexContent>
<xs:extension base="a:KeyedAuditDefinition">
<xs:attribute name="dataGenerator" type="a:NameAttribute" use="required" />
<xs:attribute name="scope" type="a:ScopeAttribute" use="required" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -108,7 +102,7 @@
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="128"/>
<xs:pattern value="([a-z]|\-)*"/>
<xs:pattern value="([a-z]|[0-9]|\-|\.)*"/>
</xs:restriction>
</xs:simpleType>
@@ -118,4 +112,12 @@
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ScopeAttribute">
<xs:restriction base="xs:string">
<xs:enumeration value="SESSION"/>
<xs:enumeration value="AUDIT"/>
<xs:enumeration value="ALL"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@@ -23,12 +23,10 @@
</DataGenerators>
<Application name="Alfresco Repository" key="repository">
<AuditSession>
<GenerateValue key="user" dataGenerator="authenticatedUser"/>
<GenerateValue key="time" dataGenerator="systemTime"/>
</AuditSession>
<GenerateValue key="user" dataGenerator="authenticatedUser" scope="SESSION"/>
<GenerateValue key="time" dataGenerator="systemTime" scope="SESSION"/>
<AuditPath key="services">
<GenerateValue key="txn" dataGenerator="transactionId"/>
<GenerateValue key="txn" dataGenerator="transactionId" scope="AUDIT"/>
<AuditPath key="nodeservice">
<AuditPath key="createstore">
<AuditPath key="protocol">
@@ -39,10 +37,12 @@
</AuditPath>
<AuditPath key="return">
<RecordValue key="value" dataExtractor="simpleValue"/>
<!--
<RecordValue key="root-node" dataExtractor="storeRootNode"/>
</AuditPath>
<AuditPath key="error">
<RecordValue key="value" dataExtractor="stackTrace"/>
-->
</AuditPath>
</AuditPath>
</AuditPath>