rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\cdapi.ips 1.1 1998/05/28 15:58:00 mfrobins Exp $ rem Rem Copyright (c) 1993 by Oracle Corporation Rem NAME Rem cdapi.pkh - Rem DESCRIPTION Rem Rem RETURNS Rem Rem NOTES Rem Rem MODIFIED (MM/DD/YY) Rem jwetherb 10/22/94 - Add param to initialize and set_context_appsys Rem jwetherb 10/22/94 - Remove cdapi.ci_user Rem jwetherb 08/22/94 - add power_delete() procedure Rem aheath 07/11/94 - Creation Rem jwetherb 08/09/93 - Creation CREATE OR REPLACE PACKAGE cdapi AS activity_status varchar2(1) DEFAULT null; activity_warnings varchar2(1) DEFAULT null; app_sys_ref number(38) DEFAULT null; app_sys_name varchar2(256) DEFAULT null; app_sys_ver number DEFAULT null; app_sys_frozen boolean DEFAULT false; app_sys_lock_handle varchar2(130) DEFAULT null; context_container_subtype varchar2(3) DEFAULT null; type msg_facility_tab is table of varchar2(3) index by binary_integer; type msg_code_tab is table of number index by binary_integer; type lrg_arg_tab is table of varchar2(512) index by binary_integer; type med_arg_tab is table of varchar2(240) index by binary_integer; type sml_arg_tab is table of varchar2(240) index by binary_integer; apierror EXCEPTION; apiwarning EXCEPTION; internalerror EXCEPTION; ol8_mode boolean default false; -- Internal flag to 'switch on' OL8 support load_mode boolean default false; -- Internal flag to 'switch off' 2ndary inserts optimizer_goal varchar2(20); -- Internal flag to store internal optimizer_goal context_group number(38) DEFAULT null; trusted_client_tool boolean DEFAULT false; -- Return state of the API FUNCTION initialized RETURN boolean; -- Return the context activity FUNCTION activity RETURN number; -- Initialize the API globals to allow operation processing PROCEDURE initialize(curr_app_sys_name varchar2 default null, curr_app_sys_ver number default null,curr_app_sys_ref number default null); -- Establish the context application system PROCEDURE set_context_appsys(curr_app_sys_name varchar2, curr_app_sys_ver number default null,curr_app_sys_ref number default null); -- Establish the context container PROCEDURE set_context_container(curr_container_name varchar2, curr_container_ref number default null); FUNCTION get_app_sys_ref RETURN number; PRAGMA RESTRICT_REFERENCES(get_app_sys_ref, WNPS, WNDS); -- Open a new activity PROCEDURE open_activity; -- Attempt to close the current activity PROCEDURE close_activity(act_status out varchar2); -- Abort the current activity PROCEDURE abort_activity; -- Validate the current activity PROCEDURE validate_activity(act_status out varchar2, act_warnings out varchar2); -- In certain cases it may be convenient to consolidate violations with API -- messages which were placed on the stack. This routine loops through the -- violations currently in the CI_VIOLATIONS view and pushes each one onto -- the stack. PROCEDURE violations_to_stack; -- Pop the top message off the stack and decrease the stack size by 1 PROCEDURE pop_message(msg_facility out varchar2, msg_code out number, arg1 out varchar2, arg2 out varchar2, arg3 out varchar2, arg4 out varchar2, arg5 out varchar2, arg6 out varchar2, arg7 out varchar2, arg8 out varchar2); -- Pop the top message off the stack, already formatted, and decrease the -- stack size by 1. Returns the message in a varchar2 string. FUNCTION pop_instantiated_message RETURN varchar2; -- Retrieve a specific message from the stack, identified by it's depth -- ('stack_depth') into the stack. Does not affect the stack. PROCEDURE get_message(stack_depth in binary_integer, msg_facility out varchar2, msg_code out number, arg1 out varchar2, arg2 out varchar2, arg3 out varchar2, arg4 out varchar2, arg5 out varchar2, arg6 out varchar2, arg7 out varchar2, arg8 out varchar2); -- Retrieve all messages currently in the stack into variable arrays. Does -- not affect the stack. PROCEDURE get_stack(msg_facility out cdapi.msg_facility_tab, msg_code out cdapi.msg_code_tab, arg1 out cdapi.lrg_arg_tab, arg2 out cdapi.med_arg_tab, arg3 out cdapi.med_arg_tab, arg4 out cdapi.med_arg_tab, arg5 out cdapi.sml_arg_tab, arg6 out cdapi.sml_arg_tab, arg7 out cdapi.sml_arg_tab, arg8 out cdapi.sml_arg_tab); -- Remove all messages from the message stack. 'cdapi.stacksize' becomes 0. PROCEDURE clear_stack; -- Return the number of messages currently in the stack. FUNCTION stacksize RETURN number; -- Return a message complete with argument substitutions. Currently -- returns the English translation. FUNCTION instantiate_message(msg_facility varchar2, msg_code number, str1 varchar2 default null, str2 varchar2 default null, str3 varchar2 default null, str4 varchar2 default null, str5 varchar2 default null, str6 varchar2 default null, str7 varchar2 default null, str8 varchar2 default null) RETURN varchar2; -- Return a message complete with argument substitutions but without -- the message code and facility FUNCTION instantiate_mess(msg_facility varchar2, msg_code number, str1 varchar2 default null, str2 varchar2 default null, str3 varchar2 default null, str4 varchar2 default null, str5 varchar2 default null, str6 varchar2 default null, str7 varchar2 default null, str8 varchar2 default null) RETURN varchar2; -- Return the version of the API FUNCTION cdapi_release RETURN varchar2; -- Return the version of CASE Repository used to build the API FUNCTION repos_release RETURN varchar2; -- Delete all elements which reference the element with the supplied ID PROCEDURE power_delete(id number); -- Create a share link from the pac_irid to the container PROCEDURE share_pac(pac_irid in number, container_reference in number); -- Delete a share link from the pac_irid to the container PROCEDURE unshare_pac(pac_irid in number, container_reference in number); -- Update the owning link from the pac_irid to make the container the new owner PROCEDURE move_pac(pac_irid in number, container_reference in number); FUNCTION identify(id number, types number) RETURN varchar2; FUNCTION identify(id number, short_name varchar2) RETURN varchar2; -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- Globals -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - is_installed boolean := false; END; /