Skip to main content

AOP_PLSQL24_PKG

Constants

Others

-- c_aop_version 
c_aop_version constant varchar2(6) := '24.1'
-- c_mime_type_docx : Constants
c_mime_type_docx constant varchar2(100) := 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
-- c_mime_type_pptx
c_mime_type_pptx constant varchar2(100) := 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
-- c_mime_type_pdf
c_mime_type_pdf constant varchar2(100) := 'application/pdf'
-- c_mime_type_html
c_mime_type_html constant varchar2(9) := 'text/html'
-- c_mime_type_markdown
c_mime_type_markdown constant varchar2(13) := 'text/markdown'

REPLACE_WITH_CLOB Function

Package to show how to make a manual call with PL/SQL to the AOP Server If APEX is not installed, you can use this package as your starting point but you would need to change the apex_web_service calls by utl_http calls or similar.

Syntax

function replace_with_clob(
p_source in clob
,p_search in varchar2
,p_replace in clob
) return clob

MAKE_AOP_REQUEST Function

Example how to make a manual call to the AOP Server and generate the correct JSON.

Syntax

function make_aop_request(
p_aop_url in varchar2 default g_aop_url,
p_api_key in varchar2 default g_api_key,
p_aop_mode in varchar2 default g_aop_mode,
p_json in clob,
p_template in blob,
p_template_type in varchar2 default null,
p_output_encoding in varchar2 default 'raw',
p_output_type in varchar2 default null,
p_output_filename in varchar2 default 'output',
p_aop_remote_debug in varchar2 default 'No',
p_output_converter in varchar2 default '',
p_prepend_files_json in clob default null,
p_append_files_json in clob default null,
p_templates_json in clob default null)
return blob

Parameters

NameDescription
p_aop_url

URL of AOP Server

p_api_key

API Key in case AOP Cloud is used

p_json

Data in JSON format

p_template

Template in blob format

p_template_type

The type of the template e.g. docx, xlsx, pptx, html, txt, md

p_output_encoding

Encoding in raw or base64

p_output_type

The extension of the output e.g. pdf, if no output type is defined, the same extension as the template is used

p_output_filename

Filename of the result

p_aop_remote_debug

Ability to do remote debugging in case the AOP Cloud is used

returnResulting file where the template and data are merged and outputted in the requested format (output type).