Object Extensions to the Carapace Audit

The Carapace Audit can be extended to record information about arbitrary objects. One example of this 'object extension' is the Message Audit.

The following steps extend the Carapace Audit so it can hold information about a new type of object.

  1. Create a Carapace script package which defines the following classes:

    Each of these classes has a fixed interface.

  2. Register this script package within the database.

Usually, the objects are held within the database -- since this allows filtering to be performed by the Audit. However, it is entirely possible to store the objects by some other means and hold only filtering information within the database.

For a complete example, see the message audit script.

Storage Class Interface

The storage class is used to store the object so that it can be retrieved by the audit system. This is used by the Auditor class. The storage class must be created as follows:

    (create Xxxx db)
where Xxxx is the name of the storage class and db is a Db database object.

The storage class is required to have the following method:

record record the object and identify it by the supplied identifier

record

Record the object and identify it by the supplied identifier.

Arguments:

idString
objObject

Return type: the empty List ()


Filter Class Interface

The filter class is used to provide information to the Audit when reading information from the Carapace Audit.

The filter class must be created as follows:

    (create Xxxx db)
where Xxxx is the name of the filter class and db is a Db database object.

The filter class is required to have the following methods:

filterHeadings return the headings/attribute names of the object which can be filtered upon in the Audit
displayHeadings return the headings/attribute names of the object which can be displayed in the Audit
fetch fetch the identified object
exists test if the identified object exists
relationships list the relationships allowed between objects of this type
filterPage return the name of HTML template used for filtering objects of this type
detailsPage return the name of HTML template used for displaying objects of this type

filterHeadings

Return the headings/attribute names of the object which can be filtered upon in the Audit.

Arguments: none

Return type: List


displayHeadings

Return the headings/attribute names of the object which can be displayed in the Audit.

Arguments: none

Return type: List


fetch

Fetch the identified object.

Arguments:

idString

Return type: Object


exists

Test if the identified object exists.

Arguments:

idString

Return type: Object


relationships

List the relationships allowed between objects of this type.

Arguments: none

Return type: List


filterPage

Return the name of HTML template used for filtering objects of this type. If no filter page is supplied, then the empty String "" is returned.

Arguments: none

Return type: String


detailsPage

Return the name of HTML template used for displaying objects of this type. If no details page is supplied, then the empty String "" is returned.

Arguments: none

Return type: String


Administration Class Interface

The administration class is used by the Admin to remove stored objects from the Audit.

The administration class must be created as follows:

    (create Xxxx db)
where Xxxx is the name of the administration class and db is a Db database object.

The administration class is required to have the following methods:

delete delete the identified object from the Audit
purge delete all objects created before the supplied time

delete

Delete the identified object from the Audit.

Arguments:

idString

Return type: the empty List ()


purge

Delete all objects created before the supplied time.

Arguments:

toTimeString

Return type: the empty List ()


Registration of an Audit Extension

Maintenance of object extensions is done using the Admin interface. This is also accessible from the Web-based UI for the Carapace Administration System.


Contents Index Current topic: audit Related topics: databases