Oracle Apps Notes

A collection of my random notes, primarily on Oracle Apps

List of JDR_UTILS APIs

JDR_UTILS is a PL/SQL package which can be used to query and inspect OA Framework metadata in the MDS repository. The complete list of JDR_UTILS APIs are given below.

Sample usage:


SQL> exec jdr_utils.listcustomizations('/oracle/apps/icx/icatalog/shopping/webui/NonCatalogRequestPG');

/oracle/apps/icx/icatalog/shopping/webui/customizations/site/0/NonCatalogRequestPG

PL/SQL procedure successfully completed

SQL>

PROCEDURE deleteEmptyCustomizations;
Deletes all empty customization documents from the repository. An empty customization document is a customization document that does not specify any modifications to the base metadata.

PROCEDURE deleteDocument(p_document VARCHAR2);
Deletes the document from the repository.
p_document – the fully qualified document name, which can represent either a document or package file.

PROCEDURE deletePackage(p_package VARCHAR2);
Deletes the package from the repository if the package is empty. If the package is not empty (i.e. it contains either documents or packages), then an error will be issued indicated that non-empty packages can not be deleted.
p_package – the fully qualified package name

FUNCTION exportDocument(
p_document VARCHAR2,
p_exportFinished OUT BOOLEAN,
p_formatted BOOLEAN DEFAULT TRUE) RETURN VARCHAR2;
Export the XML for a document and pass it back in 32k chunks. This function will return XML chunks, with a maximum size of 32k. Returns the exported XML in 32k chunks
p_document – the fully qualified name of the document.
p_exportFinished – OUT parameter which indicates whether or not the export is finished
p_formatted – TRUE indicates that the XML is formatted nicely

FUNCTION getComponentName(
p_docid jdr_paths.path_docid%TYPE,
p_compid jdr_components.comp_id%TYPE) RETURN VARCHAR2;
Gets the fully qualified name of the component.
p_docid – the ID of the document which contains the component
p_compid – the ID of the component (from comp_id in the jdr_components table)

FUNCTION getDocumentName(
p_docid jdr_paths.path_docid%TYPE) RETURN VARCHAR2;
Gets the fully qualified name of the document.
p_docid – the ID of the document

FUNCTION getTranslations(
p_document VARCHAR2) RETURN translationList;
Gets all of the translations of the specified document.
p_document – the fully qualified document name

PROCEDURE listContents(p_path VARCHAR2, p_recursive BOOLEAN DEFAULT FALSE);
Prints the contents of a package. For the non-recursive case, this will list the documents, package files and package directories. For the recursive case, this will list the document, package files and empty package directories (i.e. packages which contain no documents or child packages). In order to diferentiate documents from package directories, package directories will end with a ‘/’.
p_path – The path in which to list the documents. To specify the root directory, use ‘/’.
p_recursive – If TRUE, recursively lists the contents of sub-directories. Defaults to FALSE.

PROCEDURE listCustomizations(p_document VARCHAR2);
List the customizations for the specified document.
p_document – the fully qualified document name, which can represent either a document or package file.

PROCEDURE listDocuments(p_path VARCHAR2, p_recursive BOOLEAN DEFAULT FALSE);
Internally calls listContents.

PROCEDURE listLanguages(p_document VARCHAR2);
Lists the supported languages for the specified document.
p_document – the fully qualified document name, which can represent either a document or package file.

PROCEDURE printDocument(p_document VARCHAR2,
p_maxLineSize NUMBER DEFAULT MAX_LINE_SIZE);
Prints the contents of a JRAD document to the console.
p_document – the fully qualified document name, which can represent either a document or package file.
p_maxLineSize – 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).

PROCEDURE printTranslations(p_document VARCHAR2,
p_language VARCHAR2,
p_maxLineSize NUMBER DEFAULT MAX_LINE_SIZE);
Prints the translations for the document in XLIFF format.
p_document – the fully qualified document name, which can represent either a document or package file.
p_language – the language to use for the translations
p_maxLineSize – 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).

PROCEDURE saveTranslations(
p_document VARCHAR2,
p_translations translationList,
p_commit BOOLEAN := TRUE);
Saves the specified translations for the specified document.This procedure will do the following:
1. Lock the document so as to prevent multiple users attempting to modify translations at the same time
2. Delete all of the translations for the specified document
3. Insert the new translations
4. Commit the data unless p_commit set to FALSE
p_document – the fully qualified document name
p_translations – the list of translations to insert
p_commit – if TRUE, the data is committed. Default is TRUE

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: