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.
Each of these classes has a fixed interface.
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.
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:
where
(create Xxxx db)
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 |
recordRecord the object and identify it by the supplied identifier.
Arguments:
| id | String |
| obj | Object |
Return type: the empty List ()
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:
where
(create Xxxx db)
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 |
filterHeadingsReturn the headings/attribute names of the object which can be filtered upon in the Audit.
Arguments: none
Return type: List
displayHeadingsReturn the headings/attribute names of the object which can be displayed in the Audit.
Arguments: none
Return type: List
fetchFetch the identified object.
Arguments:
| id | String |
Return type: Object
existsTest if the identified object exists.
Arguments:
| id | String |
Return type: Object
relationshipsList 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
The administration class is used by the Admin to remove stored objects from the Audit.
The administration class must be created as follows:
where
(create Xxxx db)
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 |
deleteDelete the identified object from the Audit.
Arguments:
| id | String |
Return type: the empty List ()
purgeDelete all objects created before the supplied time.
Arguments:
| toTime | String |
Return type: the empty List ()
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 |