adm_settings_api
This document contains the API documentation for the adm_settings_api package.
Functions and Procedures
Section titled “Functions and Procedures”get_setting_value
Section titled “get_setting_value”Reads a setting.
A setting marked is_admin_only in adm_settings is refused with -20005 unless the caller is an administrator. Not result_cache: a cached result is shared across sessions, so the first successful read would hand the value to every later caller without the check ever running again. The value itself is still cached, one layer down and without the authorization decision in it - which is also why no public getter for an admin-only key may be declared result_cache.
Signature:
function get_setting_value ( p_setting_key in adm_settings.sett_key%type) return adm_settings.sett_value%type;Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_setting_key | in | adm_settings.sett_key%type | One of the c_sett_* constants |
Returns: adm_settings.sett_value%type - The stored value, or null when there is no such row
get_indexing_max_attempts
Section titled “get_indexing_max_attempts”Number of text extraction attempts the daily job makes on one queued document version before it marks the entry permanently failed. Separate from OBJECT_STORAGE_RETRY_ATTEMPTS because the two fail for unrelated reasons: an upload retry waits out a transient OCI problem, while an Oracle Text filter that rejects a file rejects it every time. Defaults to 3.
Signature:
function get_indexing_max_attempts return number result_cache;Returns: number result_cache
is_file_metadata_extraction_enabled
Section titled “is_file_metadata_extraction_enabled”Whether file metadata (title, page count, image dimensions, …) is automatically extracted on upload and stored as “file.*” document annotations. Defaults to enabled when the setting row is missing.
Signature:
function is_file_metadata_extraction_enabled return boolean result_cache;Returns: boolean result_cache
get_metadata_backfill_batch_size
Section titled “get_metadata_backfill_batch_size”Maximum number of documents the daily job backfills with file metadata per run. Bounds object storage downloads per night. Defaults to 500.
Signature:
function get_metadata_backfill_batch_size return number result_cache;Returns: number result_cache
get_fs_default_view_mode
Section titled “get_fs_default_view_mode”The view the file browser opens in when a user has no preference of their own yet: TABLE or GRID. Per-user choices live in apex_util.set_preference; this is only the fallback for a user who has never chosen. Anything else, including null, yields the default. Defaults to TABLE.
Signature:
function get_fs_default_view_mode return varchar2 result_cache;Returns: varchar2 result_cache
get_fs_default_page_size
Section titled “get_fs_default_page_size”Rows the file browser asks for per page. Clamped to the component’s own ceiling, which the default matches. Defaults to 200.
Signature:
function get_fs_default_page_size return number result_cache;Returns: number result_cache
get_fs_upload_chunk_bytes
Section titled “get_fs_upload_chunk_bytes”Size of one chunk of a chunked upload, in bytes. Defaults to 786432 (768 KiB).
MUST BE A MULTIPLE OF 3. Only then does the base64 of a non-final chunk carry no ’=’ padding and decode independently of its neighbours; with any other size the chunks cannot be decoded one at a time and the assembled file is corrupt. An upload refuses to start when the configured value breaks that rule, rather than producing damaged documents.
Signature:
function get_fs_upload_chunk_bytes return number result_cache;Returns: number result_cache
get_fs_upload_max_file_bytes
Section titled “get_fs_upload_max_file_bytes”Largest file a chunked upload may announce, in bytes. Defaults to 2147483648 (2 GiB). Checked at UPLOAD_BEGIN, before a single byte moves.
Signature:
function get_fs_upload_max_file_bytes return number result_cache;Returns: number result_cache
get_fs_upload_staging_ttl_hours
Section titled “get_fs_upload_staging_ttl_hours”How long a partially received upload is kept in adm_upload_staging before the hourly cleanup job removes it, in hours. Defaults to 24.
Signature:
function get_fs_upload_staging_ttl_hours return number result_cache;Returns: number result_cache
get_fs_tip_folder_rollup
Section titled “get_fs_tip_folder_rollup”Whether the file browser’s hover card computes a folder’s recursive size and item counts (CONTRACT.md section 3.2, ITEM_DETAILS). Defaults to true.
The one member of that method that costs real time: a range scan over the subtree’s folder_path prefix plus the join to the latest version of each document. It is bounded by get_fs_tip_rollup_max_docs and only ever asked for one folder, after the user has rested the pointer on it - but an operator with a pathological tree needs a switch, and a switch that does not exist is a patch.
‘N’ answers false; anything else, including null, is true.
Signature:
function get_fs_tip_folder_rollup return boolean result_cache;Returns: boolean result_cache
get_fs_tip_rollup_max_docs
Section titled “get_fs_tip_rollup_max_docs”Most documents the hover card’s folder rollup aggregates before it gives up and reports a partial answer. Defaults to 50000.
Past the cap the counts and the size are what was actually reached and the client renders “1.4 GB+” rather than holding the card until a full count returns. A value below 1 yields the default: a cap of zero would make every rollup partial and empty.
Signature:
function get_fs_tip_rollup_max_docs return number result_cache;Returns: number result_cache
get_share_max_attempts
Section titled “get_share_max_attempts”How many consecutive wrong passwords a single share link tolerates before it locks. Defaults to 10. Counted per link, so one attacker cannot lock out anybody else’s link.
Signature:
function get_share_max_attempts return number result_cache;Returns: number result_cache
get_share_lockout_minutes
Section titled “get_share_lockout_minutes”How long a share link stays locked after the attempt limit is reached, in minutes. Defaults to 15.
Signature:
function get_share_lockout_minutes return number result_cache;Returns: number result_cache
configure_object_storage
Section titled “configure_object_storage”Configures and enables object storage with validation Tests connectivity by attempting to write a test file to the bucket
Signature:
procedure configure_object_storage ( p_bucket in varchar2, p_region in varchar2, p_namespace in varchar2, p_credential_id in varchar2, p_verify_checksums in varchar2 default 'Y');Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_bucket | in | varchar2 | OCI Object Storage bucket name |
p_region | in | varchar2 | OCI Object Storage region |
p_namespace | in | varchar2 | OCI Object Storage namespace |
p_credential_id | in | varchar2 | APEX Web Credential static ID for OCI |
p_verify_checksums | in | varchar2 default 'Y' | Whether to verify checksums (Y/N) |
disable_object_storage
Section titled “disable_object_storage”Disables object storage
Signature:
procedure disable_object_storage;test_object_storage_connectivity
Section titled “test_object_storage_connectivity”Tests object storage connectivity Returns success message or raises exception on failure
Signature:
function test_object_storage_connectivity return varchar2;Returns: varchar2