Writing to the Carapace Audit

script caudit.cpl
interface Auditor
COM progId Carapace.Auditor

Audit information is recorded in the Carapace database using the Auditor interface.

Auditor Creation

An Auditor is created by using the create function eg.

    (create Auditor db)
where db is an Db object.

Auditor Methods

The Auditor interface has the following methods:

uniqueId return a suitable uniqueId for a new audit entry
recordActivity record the successful result of an activity
recordError record the un-successful result of an activity
recordUserActivity record the successful result of an action performed by a user
recordUserError record the un-successful result of an action performed by a user
recordObjectActivity record the successful result of an action performed on an audited object
recordObjectError record the un-successful result of an action performed on an audited object
relateObjects relate two audited objects together


uniqueId

Return a suitable uniqueId for a new audit entry.

Arguments: none

Return type: String


recordActivity

Record the successful result of an activity.

Arguments:

auditTypeString
activityString
descriptionString
...further arguments which depend on the particular auditType

Return type: the empty List


recordError

Record the un-successful result of an activity.

Arguments:

auditTypeString
activityString
descriptionString
errorError
...further arguments which depend on the particular auditType

Return type: the empty List


recordUserActivity

Record the successful result of an action performed by a user.

Arguments:

auditTypeString
activityString
descriptionString
...further arguments which depend on the particular auditType

Return type: the empty List


recordUserError

Record the un-successful result of an action performed by a user.

Arguments:

auditTypeString
activityString
descriptionString
errorError
...further arguments which depend on the particular auditType

Return type: the empty List


recordObjectActivity

Record the successful result of an action performed on an audited object.

Arguments:

objectTypeString
objectIdString
auditTypeString
activityString
descriptionString
...further arguments which depend on the particular auditType

Return type: the empty List


recordObjectError

Record the un-successful result of an action performed on an audited object.

Arguments:

objectTypeString
objectIdString
auditTypeString
activityString
descriptionString
errorError
...further arguments which depend on the particular auditType

Return type: the empty List


relateObjects

Relate two audited objects together. Consider the example of an envelope which contains a message. If we have audited details about each of the envelope-object and the message-object, then these can be related as follows:

    (auditor.relateObjects "envelope" envelopeId "contains" "message" messageId)

Arguments:

leftObjectTypeString
leftObjectIdString
relationString
rightObjectTypeString
rightObjectIdString

Return type: the empty List


Contents Index Current topic: audit Related topics: databases