adm_audit_api
This document contains the API documentation for the adm_audit_api package.
Functions and Procedures
Section titled “Functions and Procedures”add_audit
Section titled “add_audit”Writes one audit row, stamped with the current identity and channel.
p_action_details longer than the column can hold - 4000 characters, and 4000 bytes on a multibyte database - is truncated with a trailing ’…’ rather than raising. Everything else that goes wrong here is raised, so a genuine audit failure still aborts the caller.
Signature:
procedure add_audit ( p_action_type in adm_audit_log.action_type%type, p_action_details in adm_audit_log.action_details%type default null, p_document_id in adm_audit_log.document_id%type default null, p_folder_id in adm_audit_log.folder_id%type default null);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_action_type | in | adm_audit_log.action_type%type | One of the c_action_* constants |
p_action_details | in | adm_audit_log.action_details%type default null | Free text describing the action |
p_document_id | in | adm_audit_log.document_id%type default null | The document the action applies to |
p_folder_id | in | adm_audit_log.folder_id%type default null | The folder the action applies to; the root folder is used when |
neither a document nor a folder is given |current_user_id
Section titled “current_user_id”The identity that add_audit stamps on a row.
Exposed so that callers writing many audit rows in one statement - the subtree operations in adm_folder_api - can stamp them the same way add_audit would without having to know how the identity is derived. Read it once into a local and bind it, rather than calling it per row.
Signature:
function current_user_id return adm_audit_log.user_id%type;Returns: adm_audit_log.user_id%type - the ADM context username when there is one, else the APEX session user, else
the database user
current_user_access
Section titled “current_user_access”The access channel that add_audit stamps on a row. See [current_user_id].
Signature:
function current_user_access return adm_audit_log.user_access%type;Returns: adm_audit_log.user_access%type - the access source of the ADM context when there is one, else ‘APEX’ inside an
APEX session and ‘DB’ otherwise