All about JDR_UTILS – An API to explore OAF metadata

JDR_UTILS is a PL/SQL package which has procedures and functions to query OA Framework personalizations/customizations present in OA Framework metadata in the MDS repository.

Here are some useful JDR_UTILS APIs:

JDR_UTILS.LISTDOCUMENTS

Use this API to list of all OA Framework documents in the given path/module. It provides list of all the pages/extensions/personalizations.

Parameters:
1. p_path – VARCHAR2 – Full/Partial path of MDS repository
2. p_recursive – BOOLEAN DEFAULT FALSE – TRUE will direct the API to list all Child Documents underneath that tree path

Example:

DECLARE
BEGIN
jdr_utils.listdocuments('/oracle/apps/per/probation/', TRUE);
END;
/

JDR_UTILS.LISTCUSTOMIZATIONS

Use this API to list all personalizations/Extensions/Contents of a specific Object.

Parameters:
1. p_document – VARCHAR2 – The fully qualified document name, which can represent either a document or package file

Example:

DECLARE
BEGIN
jdr_utils.listcustomizations
(p_document => '/xxhr/oracle/apps/per/probation/webui/AddKpiPG');
END;
/

JDR_UTILS.PRINTDOCUMENT

This procedure lists the contents of a specific object.
For example, using below code, we can get all the components(items and page properties) of the page -> TrackPG

Parameters:
1. p_document – VARCHAR2 – The fully qualified document name, which can represent either a document or package file.
2. p_maxLineSize – NUMBER DEFAULT MAX_LINE_SIZE – the maximum size of line. This defaults to 255 which is the maximim allowable size of a line (the 255 limit is a limitation of the DBMS_OUPUT package)

Example:

DECLARE
BEGIN
  jdr_utils.printDocument('/xxhr/oracle/apps/per/probation/webui/TrackPG');
EXCEPTION
WHEN OTHERS THEN
  DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
/

JDR_UTILS.DELETEDOCUMENT

You can delete a page/personalization/extension by using command below. For example to delete the Application Module substitution, use command

Parameters:
1. p_document – VARCHAR2 – The fully qualified document name, which can represent either a document or package file.

Example:

DECLARE
BEGIN
jdr_utils.deletedocument(p_document => '/oracle/apps/per/probation/server/customizations/addTemplateAM');
END;
/
Tags: