adm_document_api
This document contains the API documentation for the adm_document_api
package.
Functions and Procedures
Section titled “Functions and Procedures”create_document
Section titled “create_document”Creates a new document
Signature:
function create_document ( p_folder_id in adm_documents.folder_id%type, p_document_name in adm_documents.document_name%type, p_file_content in adm_document_versions.file_content%type, p_file_mime_type in adm_documents.file_mime_type%type) return adm_documents.document_id%type;
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_folder_id | in | adm_documents.folder_id%type | The folder ID where the document will be stored |
p_document_name | in | adm_documents.document_name%type | The name of the document |
p_file_content | in | adm_document_versions.file_content%type | The binary content of the file |
p_file_mime_type | in | adm_documents.file_mime_type%type | The MIME type of the file |
Returns: adm_documents.document_id%type
- The ID of the newly created document
add_document_version
Section titled “add_document_version”Adds a new version to an existing document
Signature:
function add_document_version ( p_document_id in adm_documents.document_id%type, p_file_content in adm_document_versions.file_content%type) return adm_document_versions.version_id%type;
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The document ID to add a version to |
p_file_content | in | adm_document_versions.file_content%type | The binary content of the file |
Returns: adm_document_versions.version_id%type
- The ID of the newly created version
calculate_checksum
Section titled “calculate_checksum”Calculates a SHA-256 checksum for a BLOB
Signature:
function calculate_checksum ( p_blob in blob) return varchar2;
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_blob | in | blob | The BLOB to calculate the checksum for |
Returns: varchar2
- The SHA-256 checksum as a hexadecimal string
rename_document
Section titled “rename_document”Renames an existing document
Signature:
procedure rename_document ( p_document_id in adm_documents.document_id%type, p_new_name in adm_documents.document_name%type);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document to be renamed |
p_new_name | in | adm_documents.document_name%type | The new name for the document |
move_document
Section titled “move_document”Moves a document to a different folder
Signature:
procedure move_document ( p_document_id in adm_documents.document_id%type, p_destination_folder_id in adm_folders.folder_id%type);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document to be moved |
p_destination_folder_id | in | adm_folders.folder_id%type | The ID of the destination folder |
trash_document
Section titled “trash_document”Moves a document to the user’s trash folder
Signature:
procedure trash_document ( p_document_id in adm_documents.document_id%type, p_user_id in varchar2);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document to be moved to trash |
p_user_id | in | varchar2 | The ID of the user who is trashing the document |
restore_document
Section titled “restore_document”Restores a document from the trash to its original location
Signature:
procedure restore_document ( p_document_id in adm_documents.document_id%type);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document in trash to be restored |
permanently_delete_document
Section titled “permanently_delete_document”Permanently deletes a document from the trash
Signature:
procedure permanently_delete_document ( p_document_id in adm_documents.document_id%type);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document to be permanently deleted |
add_file_retention
Section titled “add_file_retention”Adds a retention policy to a document
Signature:
procedure add_file_retention ( p_document_id in adm_documents.document_id%type, p_retention_delete_date in adm_documents.retention_delete_date%type, p_retention_category in adm_documents.retention_category%type default null);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document to which the retention policy will be added |
p_retention_delete_date | in | adm_documents.retention_delete_date%type | The date when the document should be deleted according to the retention policy |
p_retention_category | in | adm_documents.retention_category%type default null | - |
remove_file_retention
Section titled “remove_file_retention”Removes a retention policy from a document
Signature:
procedure remove_file_retention ( p_document_id in adm_documents.document_id%type);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document from which the retention policy will be removed |
add_legal_hold
Section titled “add_legal_hold”Adds a legal hold to a document
Signature:
procedure add_legal_hold ( p_document_id in adm_documents.document_id%type);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document to which the legal hold will be added |
lift_legal_hold
Section titled “lift_legal_hold”Lifts a legal hold from a document
Signature:
procedure lift_legal_hold ( p_document_id in adm_documents.document_id%type);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document from which the legal hold will be lifted |
delete_document_version
Section titled “delete_document_version”Deletes a specific document version Note: You cannot delete the latest version - use trash_document instead
Signature:
procedure delete_document_version ( p_version_id in adm_document_versions.version_id%type);
Parameters:
Name | Direction | Type | Description |
---|---|---|---|
p_version_id | in | adm_document_versions.version_id%type | The ID of the document version to be deleted |