INSTALL Procedure

This procedure installs an application. Use the APEX_APPLICATION_INSTALL.SET% procedures to configure installation parameters.

Syntax

PROCEDURE INSTALL (
    p_source             IN apex_t_export_files    DEFAULT NULL,
    p_overwrite_existing IN BOOLEAN                DEFAULT FALSE );

Parameters

Parameter Description
p_source

The source code, a table of (name, contents) with a single record for normal Oracle APEX applications or multiple records for applications that were split when exporting.

Passing multiple applications is not supported.

If null (default), imports the source that was previously passed to GET_INFO.

p_overwrite_existing If FALSE (default), raises an error instead of overwriting an existing application.

Raises

Example

Fetch an application from a remote URL, then install it with a new ID and new component ID offsets in workspace EXAMPLE.

DECLARE
    l_source apex_t_export_files;
    l_info   apex_application_install.t_file_info;
BEGIN
    l_source := apex_t_export_files (
                    apex_t_export_file (
                         name     => 'f100.sql',
                         contents => apex_web_service.make_rest_request (
                                          p_url         => 'https://www.example.com/apps/f100.sql',
                                          p_http_method => 'GET' )));

    apex_util.set_workspace('EXAMPLE');
    apex_application_install.generate_application_id;
    apex_application_install.generate_offset;
    apex_application_install.install (
         p_source => l_source );
END;