Real Time Information Director User Documentation

RTID Security and Auditing
Hewlett-Packard Company 15 529618 - 002
Retrieving Audit Detail Records
To obtain the full audit detail record, ABC can use an audit document, as described by
the following metadata. (You cant tell by looking at the metadata itself, but a document
of this type causes the Director to read from the AuditDetail table.)
package com.hp.ehr.documents;
import com.hp.rtid.metadata.AuditDocumentDefinition;
import com.hp.rtid.metadata.DocumentRecord;
import com.hp.rtid.metadata.MetadataInconsistency;
import com.hp.rtid.metadata.RequestRecord;
import java.sql.SQLException;
public class AuditDocument extends AuditDocumentDefinition
{
// Metadata Constructor:
public AuditDocument() throws MetadataInconsistency, SQLException
{
super(documentRecord(),"AUDITDOCUMENT");
}
private static DocumentRecord documentRecord()
throws MetadataInconsistency, SQLException
{
return new RequestRecord("AUDITID AUDITDOCTYPE");
}
}
Here ABC makes the query to obtain the audit detail record for audit ID 1000:
<?xml version="1.0" encoding="ISO-8859-1" ?>
-
<AUDITDOCUMENT>
-
<HEADER>
<CONSUMER>CDE</CONSUMER>
<CONSUMERTYPECODE>PCP</CONSUMERTYPECODE>
<AGENT>ABC</AGENT>
<AGENTTYPECODE>PCP</AGENTTYPECODE>
<DATE>2004-02-12</DATE>
<ROLE>DETECTIVE</ROLE>
</HEADER>
-
<KEYS>
<AUDITID>1000</AUDITID>
<AUDITDOCTYPE>1</AUDITDOCTYPE>
</KEYS>
</AUDITDOCUMENT>
The response to the query includes the whole audit detail record, in this case the
PERSON record created by an insert transaction. (Most of the data that would be
returned as part of the audited PERSON record is omitted here for brevity. The actual
response would be 3280 bytes long.)