adm_annotations_api
API for managing document and folder annotations (metadata key-value pairs for background processing)
Functions and Procedures
Section titled “Functions and Procedures”add_document_annotation
Section titled “add_document_annotation”Add a new annotation for a document Raises an error if an annotation with the same key already exists
Signature:
procedure add_document_annotation ( p_document_id in number, p_annotation_key in varchar2, p_annotation_value in varchar2 default null);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_document_id | in | number | The document ID |
p_annotation_key | in | varchar2 | The annotation key (must be lowercase) |
p_annotation_value | in | varchar2 default null | The annotation value |
update_document_annotation
Section titled “update_document_annotation”Update an existing annotation for a document Raises an error if the annotation does not exist
Signature:
procedure update_document_annotation ( p_document_id in number, p_annotation_key in varchar2, p_annotation_value in varchar2);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_document_id | in | number | The document ID |
p_annotation_key | in | varchar2 | The annotation key |
p_annotation_value | in | varchar2 | The new annotation value |
get_document_annotation
Section titled “get_document_annotation”Get an annotation value for a document. Throws an error if not found.
Signature:
function get_document_annotation ( p_document_id in number, p_annotation_key in varchar2) return varchar2;Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_document_id | in | number | The document ID |
p_annotation_key | in | varchar2 | The annotation key |
Returns: varchar2 - The annotation value
document_annotation_exists
Section titled “document_annotation_exists”Check if an annotation exists for a document
Signature:
function document_annotation_exists ( p_document_id in number, p_annotation_key in varchar2) return boolean;Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_document_id | in | number | The document ID |
p_annotation_key | in | varchar2 | The annotation key |
Returns: boolean - boolean indicating if the annotation exists
delete_document_annotation
Section titled “delete_document_annotation”Delete an annotation for a document
Signature:
procedure delete_document_annotation ( p_document_id in number, p_annotation_key in varchar2);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_document_id | in | number | The document ID |
p_annotation_key | in | varchar2 | The annotation key |
delete_all_document_annotations
Section titled “delete_all_document_annotations”Delete all annotations for a document
Signature:
procedure delete_all_document_annotations ( p_document_id in number);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_document_id | in | number | The document ID |
add_folder_annotation
Section titled “add_folder_annotation”Add a new annotation for a folder Raises an error if an annotation with the same key already exists
Signature:
procedure add_folder_annotation ( p_folder_id in number, p_annotation_key in varchar2, p_annotation_value in varchar2 default null);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_folder_id | in | number | The folder ID |
p_annotation_key | in | varchar2 | The annotation key (must be lowercase) |
p_annotation_value | in | varchar2 default null | The annotation value |
update_folder_annotation
Section titled “update_folder_annotation”Update an existing annotation for a folder Raises an error if the annotation does not exist
Signature:
procedure update_folder_annotation ( p_folder_id in number, p_annotation_key in varchar2, p_annotation_value in varchar2);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_folder_id | in | number | The folder ID |
p_annotation_key | in | varchar2 | The annotation key |
p_annotation_value | in | varchar2 | The new annotation value |
get_folder_annotation
Section titled “get_folder_annotation”Get an annotation value for a folder. Throws an error if not found.
Signature:
function get_folder_annotation ( p_folder_id in number, p_annotation_key in varchar2) return varchar2;Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_folder_id | in | number | The folder ID |
p_annotation_key | in | varchar2 | The annotation key |
Returns: varchar2 - The annotation value
folder_annotation_exists
Section titled “folder_annotation_exists”Check if an annotation exists for a folder
Signature:
function folder_annotation_exists ( p_folder_id in number, p_annotation_key in varchar2) return boolean;Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_folder_id | in | number | The folder ID |
p_annotation_key | in | varchar2 | The annotation key |
Returns: boolean - boolean indicating if the annotation exists
delete_folder_annotation
Section titled “delete_folder_annotation”Delete an annotation for a folder
Signature:
procedure delete_folder_annotation ( p_folder_id in number, p_annotation_key in varchar2);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_folder_id | in | number | The folder ID |
p_annotation_key | in | varchar2 | The annotation key |
delete_all_folder_annotations
Section titled “delete_all_folder_annotations”Delete all annotations for a folder
Signature:
procedure delete_all_folder_annotations ( p_folder_id in number);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_folder_id | in | number | The folder ID |